From 91664d4d6fa42cb8606bae982805d9d0fb22c57a Mon Sep 17 00:00:00 2001 From: Pratik Prajapati Date: Mon, 24 Jul 2017 13:53:26 -0700 Subject: util/inteltool: Add support for SGX status Add support for dumping Intel Software Guard Extension (SGX) status. --sgx or -x is the command line switch to get SGX status. The code iterates through all cores and reads MSRs to check if SGX is supported, enabled and the feature is locked. Change-Id: I1f5046c1f6703f5429c8717053ffe9c981cedf6f Signed-off-by: Pratik Prajapati Reviewed-on: https://review.coreboot.org/20758 Reviewed-by: Philipp Deppenwiese Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel --- util/inteltool/inteltool.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'util/inteltool/inteltool.h') diff --git a/util/inteltool/inteltool.h b/util/inteltool/inteltool.h index e463260a43..d4aa96fc60 100644 --- a/util/inteltool/inteltool.h +++ b/util/inteltool/inteltool.h @@ -224,6 +224,12 @@ msr_t freebsd_rdmsr(int addr); int freebsd_wrmsr(int addr, msr_t msr); #endif typedef struct { uint16_t addr; int size; char *name; } io_register_t; +typedef struct { + uint32_t eax; + uint32_t ebx; + uint32_t ecx; + uint32_t edx; +} cpuid_result_t; void *map_physical(uint64_t phys_addr, size_t len); void unmap_physical(void *virt_addr, size_t len); @@ -241,4 +247,5 @@ int print_ambs(struct pci_dev *nb, struct pci_access *pacc); int print_spi(struct pci_dev *sb); int print_gfx(struct pci_dev *gfx); int print_ahci(struct pci_dev *ahci); +int print_sgx(void); void ivybridge_dump_timings(const char *dump_spd_file); -- cgit v1.2.3