Name of user not set #1002358 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33234
Change subject: security/intel/stm STM support ......................................................................
security/intel/stm STM support
Initial commit for Coreboot STM supporX
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,235 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/1
diff --git a/src/security/Kconfig b/src/security/Kconfig index 6a334ac..e9b5225 100644 --- a/src/security/Kconfig +++ b/src/security/Kconfig @@ -14,3 +14,4 @@
source "src/security/vboot/Kconfig" source "src/security/tpm/Kconfig" +source "src/security/intel/stm/Kconfig" diff --git a/src/security/Makefile.inc b/src/security/Makefile.inc index a940b82..e49c172 100644 --- a/src/security/Makefile.inc +++ b/src/security/Makefile.inc @@ -1,2 +1,4 @@ subdirs-y += vboot subdirs-y += tpm +subdirs-y += intel/stm + diff --git a/src/security/intel/stm/Kconfig b/src/security/intel/stm/Kconfig new file mode 100644 index 0000000..e8eea02 --- /dev/null +++ b/src/security/intel/stm/Kconfig @@ -0,0 +1,17 @@ + +menu "SMI Transfer Monitor (STM)" + +config STM + bool "Enable STM" + default y + depends on (PLATFORM_USES_FSP2_0||PLATFORM_USES_FSP1_1||PLATFORM_USES_FSP1_0) + +if STM + +config MSEG_SIZE + hex "mseg size" + default 0x400000 + +endif #STM + +endmenu diff --git a/src/security/intel/stm/Makefile.inc b/src/security/intel/stm/Makefile.inc new file mode 100644 index 0000000..24d7bac --- /dev/null +++ b/src/security/intel/stm/Makefile.inc @@ -0,0 +1,16 @@ + +# put the stm where is can be found + +cbfs-files-y += stm.bin +stm.bin-file = stm.bin +stm.bin-type = raw + +ramstage-y += SmmStm.c +ramstage-y += StmPlatformSmm.c +ramstage-y += StmPlatformResource.c + +smm-y += StmPlatformResource.c +smm-y += SmmStm.c +smm-y += StmPlatformSmm.c + + diff --git a/src/security/intel/stm/SmmStm.c b/src/security/intel/stm/SmmStm.c new file mode 100644 index 0000000..677d514 --- /dev/null +++ b/src/security/intel/stm/SmmStm.c @@ -0,0 +1,894 @@ +/** @file + + SMM STM support + + Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. + + This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include <security/intel/stm/SmmStm.h> +#include <cpu/x86/msr.h> +#include <cpu/x86/cr.h> +#include <string.h> +#include <cpu/x86/mp.h> +#include <console/console.h> + +#define TXT_EVTYPE_BASE 0x400 +#define TXT_EVTYPE_STM_HASH (TXT_EVTYPE_BASE + 14) + +#define RDWR_ACCS 3 +#define FULL_ACCS 7 + +#define SIZE_4KB 0x00001000 +#define SIZE_4MB 0x00400000 + +#define IA32_PG_P (1<<0) +#define IA32_PG_RW (1<<1) +#define IA32_PG_PS (1<<7) + +#define STM_PAGE_SHIFT 12 +#define STM_PAGE_MASK 0xFFF +#define STM_SIZE_TO_PAGES(a) (((a) >> STM_PAGE_SHIFT) + (((a) & STM_PAGE_MASK) ? 1 : 0)) +#define STM_PAGES_TO_SIZE(a) ((a) << STM_PAGE_SHIFT) + +#define STM_ACCESS_DENIED 15 +#define STM_UNSUPPORTED 3 + +#define STM_BUFFER_TOO_SMALL 1 + +#define STM_SM_MONITOR_STATE_ENABLED 1 + +#define RESOURCEHEAPSIZE 4096 + +uint32_t GetVmcsSize(void); +void StmGen4GPageTableIa32(uint32_t PageTableBase); +void StmGen4GPageTableX64(uint32_t PageTableBase); +bool StmCheckStmImage(void * StmImage, uint32_t StmImageSize); +void StmLoadStmImage(void * StmImage, UINTN StmImageSize); + +bool HandleSingleResource(STM_RSC *Resource, STM_RSC *Record); +void AddSingleResource(STM_RSC *Resource); +void AddResource(STM_RSC *ResourceList, uint32_t NumEntries); +bool ValidateResource(STM_RSC *ResourceList, uint32_t NumEntries); +UINTN GetResourceSize(STM_RSC *ResourceList, uint32_t NumEntries); + +typedef struct { + + uint64_t VmcsRevisionID:31; + uint64_t AlwaysZero:1; + uint64_t VmcsSize:13; + uint64_t Reserved1:3; + uint64_t VmxonAddWidth:1; + uint64_t StmSupported:1; + uint64_t VmcsMemoryType:4; + uint64_t InOutReporting:1; + uint64_t MayClearDefaults:1; + uint64_t Reserved2:8; +} VMX_BASIC_MSR_BITS; + +typedef union { + VMX_BASIC_MSR_BITS bits; + uint64_t uint64; + msr_t msr; +} VMX_BASIC_MSR; + +typedef struct { + uint64_t valid:1; + uint64_t reserved1:1; + uint64_t VmxOffBlockSmi:1; + uint64_t reserved2:9; + uint64_t MsegAddress:20; + uint64_t reserved3:32; +} SMM_MONITOR_CTL_MSR_BITS; + +extern struct mp_state { + struct mp_ops ops; + int cpu_count; + uintptr_t perm_smbase; + size_t perm_smsize; + size_t smm_save_state_size; + int do_smm; +} mp_state; + +typedef union { + SMM_MONITOR_CTL_MSR_BITS bits; + uint64_t uint64; + msr_t msr; +} SMM_MONITOR_CTL_MSR; + +// +// Template of STM_RSC_END structure for copying. +// + +STM_RSC_END mRscEndNode = { + {END_OF_RESOURCES, sizeof(STM_RSC_END)}, +}; + +uint8_t *mStmResourcesPtr = NULL; +UINTN mStmResourceTotalSize = 0x0; +UINTN mStmResourceSizeUsed = 0x0; +UINTN mStmResourceSizeAvailable = 0x0; + +uint8_t StmResourceHeap[RESOURCEHEAPSIZE]; + +uint32_t mStmState = 0; + +/** + + Handle single Resource to see if it can be merged into Record. + + @param Resource A pointer to resource node to be added + @param Record A pointer to record node to be merged + + @retval true resource handled + @retval false resource is not handled + +**/ + +bool +HandleSingleResource( + STM_RSC *Resource, + STM_RSC *Record + ) +{ + uint64_t ResourceLo; + uint64_t ResourceHi; + uint64_t RecordLo; + uint64_t RecordHi; + + ResourceLo = 0; + ResourceHi = 0; + RecordLo = 0; + RecordHi = 0; + + // + // Calling code is responsible for making sure that + // Resource->Header.RscType == (*Record)->Header.RscType + // thus we use just one of them as switch variable. + // + + switch (Resource->Header.RscType) { + case MEM_RANGE: + case MMIO_RANGE: + ResourceLo = Resource->Mem.Base; + ResourceHi = Resource->Mem.Base + Resource->Mem.Length; + RecordLo = Record->Mem.Base; + RecordHi = Record->Mem.Base + Record->Mem.Length; + if (Resource->Mem.RWXAttributes != Record->Mem.RWXAttributes) { + if ((ResourceLo == RecordLo) && (ResourceHi == RecordHi)) { + Record->Mem.RWXAttributes = Resource->Mem.RWXAttributes | Record->Mem.RWXAttributes; + return true; + } else { + return false; + } + } + break; + case IO_RANGE: + case TRAPPED_IO_RANGE: + ResourceLo = (uint64_t) Resource->Io.Base; + ResourceHi = (uint64_t) Resource->Io.Base + (uint64_t) Resource->Io.Length; + RecordLo = (uint64_t) Record->Io.Base; + RecordHi = (uint64_t) Record->Io.Base + (uint64_t) Record->Io.Length; + break; + case PCI_CFG_RANGE: + if ((Resource->PciCfg.OriginatingBusNumber != Record->PciCfg.OriginatingBusNumber) || + (Resource->PciCfg.LastNodeIndex != Record->PciCfg.LastNodeIndex)) { + return false; + } + if (memcmp (Resource->PciCfg.PciDevicePath, Record->PciCfg.PciDevicePath, sizeof(STM_PCI_DEVICE_PATH_NODE) * (Resource->PciCfg.LastNodeIndex + 1)) != 0) { + return false; + } + ResourceLo = (uint64_t) Resource->PciCfg.Base; + ResourceHi = (uint64_t) Resource->PciCfg.Base + (uint64_t) Resource->PciCfg.Length; + RecordLo = (uint64_t) Record->PciCfg.Base; + RecordHi = (uint64_t) Record->PciCfg.Base + (uint64_t) Record->PciCfg.Length; + if (Resource->PciCfg.RWAttributes != Record->PciCfg.RWAttributes) { + if ((ResourceLo == RecordLo) && (ResourceHi == RecordHi)) { + Record->PciCfg.RWAttributes = Resource->PciCfg.RWAttributes | Record->PciCfg.RWAttributes; + return true; + } else { + return false; + } + } + break; + case MACHINE_SPECIFIC_REG: + // + // Special case - merge MSR masks in place. + // + if (Resource->Msr.MsrIndex != Record->Msr.MsrIndex) { + return false; + } + Record->Msr.ReadMask |= Resource->Msr.ReadMask; + Record->Msr.WriteMask |= Resource->Msr.WriteMask; + return true; + default: + return false; + } + // + // If resources are disjoint + // + if ((ResourceHi < RecordLo) || (ResourceLo > RecordHi)) { + return false; + } + + // + // If resource is consumed by record. + // + if ((ResourceLo >= RecordLo) && (ResourceHi <= RecordHi)) { + return true; + } + // + // Resources are overlapping. + // Resource and record are merged. + // + ResourceLo = (ResourceLo < RecordLo) ? ResourceLo : RecordLo; + ResourceHi = (ResourceHi > RecordHi) ? ResourceHi : RecordHi; + + switch (Resource->Header.RscType) { + case MEM_RANGE: + case MMIO_RANGE: + Record->Mem.Base = ResourceLo; + Record->Mem.Length = ResourceHi - ResourceLo; + break; + case IO_RANGE: + case TRAPPED_IO_RANGE: + Record->Io.Base = (uint64_t) ResourceLo; + Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo); + break; + case PCI_CFG_RANGE: + Record->PciCfg.Base = (uint64_t) ResourceLo; + Record->PciCfg.Length = (uint64_t) (ResourceHi - ResourceLo); + break; + default: + return false; + } + + return true; +} + +/** + + Add resource node. + + @param Resource A pointer to resource node to be added + +**/ +void AddSingleResource(STM_RSC *Resource) +{ + STM_RSC *Record; + + Record = (STM_RSC *)mStmResourcesPtr; + + while (true) { + if (Record->Header.RscType == END_OF_RESOURCES) { + break; + } + // + // Go to next record if resource and record types don't match. + // + if (Resource->Header.RscType != Record->Header.RscType) { + Record = (STM_RSC *)((void *)Record + Record->Header.Length); + continue; + } + // + // Record is handled inside of procedure - don't adjust. + // + if (HandleSingleResource (Resource, Record)) { + return ; + } + Record = (STM_RSC *)((void *)Record + Record->Header.Length); + } + + // + // Add resource to the end of area. + // + memcpy ( + mStmResourcesPtr + mStmResourceSizeUsed - sizeof(mRscEndNode), + Resource, + Resource->Header.Length + ); + memcpy ( + mStmResourcesPtr + mStmResourceSizeUsed - sizeof(mRscEndNode) + Resource->Header.Length, + &mRscEndNode, + sizeof(mRscEndNode) + ); + mStmResourceSizeUsed += Resource->Header.Length; + mStmResourceSizeAvailable = mStmResourceTotalSize - mStmResourceSizeUsed; + + return ; +} + +/** + + Add resource list. + + @param ResourceList A pointer to resource list to be added + @param NumEntries Optional number of entries. + If 0, list must be terminated by END_OF_RESOURCES. + +**/ +void AddResource(STM_RSC *ResourceList, uint32_t NumEntries) +{ + uint32_t Count; + UINTN Index; + STM_RSC *Resource; + + if (NumEntries == 0) { + Count = 0xFFFFFFFF; + } else { + Count = NumEntries; + } + + Resource = ResourceList; + + for (Index = 0; Index < Count; Index++) { + if (Resource->Header.RscType == END_OF_RESOURCES) { + return ; + } + AddSingleResource (Resource); + Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length); + } + return ; +} + +/** + + Validate resource list. + + @param ResourceList A pointer to resource list to be added + @param NumEntries Optional number of entries. + If 0, list must be terminated by END_OF_RESOURCES. + + @retval true resource valid + @retval false resource invalid + +**/ +bool +ValidateResource ( + STM_RSC *ResourceList, + uint32_t NumEntries + ) +{ + uint32_t Count; + UINTN Index; + STM_RSC *Resource; + UINTN SubIndex; + + // + // If NumEntries == 0 make it very big. Scan will be terminated by + // END_OF_RESOURCES. + // + if (NumEntries == 0) { + Count = 0xFFFFFFFF; + } else { + Count = NumEntries; + } + + // + // Start from beginning of resource list. + // + Resource = ResourceList; + + for (Index = 0; Index < Count; Index++) { + printk(BIOS_DEBUG, "ValidateResource (%llu) - RscType(%x)\n", Index, Resource->Header.RscType); + // + // Validate resource. + // + switch (Resource->Header.RscType) { + case END_OF_RESOURCES: + if (Resource->Header.Length != sizeof (STM_RSC_END)) { + return false; + } + // + // If we are passed actual number of resources to add, + // END_OF_RESOURCES structure between them is considered an + // error. If NumEntries == 0 END_OF_RESOURCES is a termination. + // + if (NumEntries != 0) { + return false; + } else { + // + // If NumEntries == 0 and list reached end - return success. + // + return true; + } + break; + + case MEM_RANGE: + case MMIO_RANGE: + if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) { + return false; + } + + if (Resource->Mem.RWXAttributes > FULL_ACCS) { + return false; + } + break; + + case IO_RANGE: + case TRAPPED_IO_RANGE: + if (Resource->Header.Length != sizeof (STM_RSC_IO_DESC)) { + return false; + } + + if ((Resource->Io.Base + Resource->Io.Length) > 0xFFFF) { + return false; + } + break; + + case PCI_CFG_RANGE: + printk(BIOS_DEBUG, "ValidateResource - PCI (0x%02x, 0x%08x, 0x%02x, 0x%02x)\n", Resource->PciCfg.OriginatingBusNumber, Resource->PciCfg.LastNodeIndex, Resource->PciCfg.PciDevicePath[0].PciDevice, Resource->PciCfg.PciDevicePath[0].PciFunction); + if (Resource->Header.Length != sizeof (STM_RSC_PCI_CFG_DESC) + (sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex)) { + return false; + } + for (SubIndex = 0; SubIndex <= Resource->PciCfg.LastNodeIndex; SubIndex++) { + if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) { + return false; + } + } + if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { + return false; + } + break; + + case MACHINE_SPECIFIC_REG: + if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) { + return false; + } + break; + + default : + printk(BIOS_DEBUG, "ValidateResource - Unknown RscType(%x)\n", Resource->Header.RscType); + return false; + } + Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length); + } + return true; +} + +/** + + Get resource list. + EndResource is excluded. + + @param ResourceList A pointer to resource list to be added + @param NumEntries Optional number of entries. + If 0, list must be terminated by END_OF_RESOURCES. + + @retval true resource valid + @retval false resource invalid + +**/ +UINTN +GetResourceSize ( + STM_RSC *ResourceList, + uint32_t NumEntries + ) +{ + uint32_t Count; + UINTN Index; + STM_RSC *Resource; + + Resource = ResourceList; + + // + // If NumEntries == 0 make it very big. Scan will be terminated by + // END_OF_RESOURCES. + // + if (NumEntries == 0) { + Count = 0xFFFFFFFF; + } else { + Count = NumEntries; + } + + // + // Start from beginning of resource list. + // + Resource = ResourceList; + + for (Index = 0; Index < Count; Index++) { + if (Resource->Header.RscType == END_OF_RESOURCES) { + break; + } + Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length); + } + return (UINTN)((uint32_t)Resource - (uint32_t) ResourceList); +} + +/** + + Add resources in list to database. Allocate new memory areas as needed. + + @param ResourceList A pointer to resource list to be added + @param NumEntries Optional number of entries. + If 0, list must be terminated by END_OF_RESOURCES. + + @retval EFI_SUCCESS If resources are added + @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer + @retval EFI_OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas. + +**/ +int +AddPiResource ( + STM_RSC *ResourceList, + uint32_t NumEntries + ) +{ + //int Status; + UINTN ResourceSize; + //void * NewResource; + //UINTN NewResourceSize; + + printk (BIOS_DEBUG, "AddPiResource - Enter\n"); + + if (!ValidateResource (ResourceList, NumEntries)) { + return -1; //EFI_INVALID_PARAMETER; + } + + ResourceSize = GetResourceSize (ResourceList, NumEntries); + printk (BIOS_DEBUG, "ResourceSize - 0x%08llx\n", ResourceSize); + if (ResourceSize == 0) { + return -1;//EFI_INVALID_PARAMETER; + } + + if (mStmResourcesPtr == NULL) { + // + // Copy EndResource for intialization + // + //mStmResourcesPtr = (uint8_t *)(UINTN)NewResource; + //mStmResourceTotalSize = NewResourceSize; + + mStmResourcesPtr = StmResourceHeap; + mStmResourceTotalSize = RESOURCEHEAPSIZE; + memset(mStmResourcesPtr, 0, RESOURCEHEAPSIZE); + + memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode)); + mStmResourceSizeUsed = sizeof(mRscEndNode); + mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode); + + // + // Let SmmCore change resource ptr + // + //NotifyStmResourceChange (mStmResourcesPtr); + } else if (mStmResourceSizeAvailable < ResourceSize) { + // + // Need enlarge + // + printk(BIOS_DEBUG, "ERROR - not enough soace for SMM resource list\n"); + return -1; + } + + // + // Check duplication + // + AddResource (ResourceList, NumEntries); + + return 0;//EFI_SUCCESS; +} + +/** + + Delete resources in list to database. + + @param ResourceList A pointer to resource list to be deleted + NULL means delete all resources. + @param NumEntries Optional number of entries. + If 0, list must be terminated by END_OF_RESOURCES. + + @retval EFI_SUCCESS If resources are deleted + @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer + +**/ +int32_t +DeletePiResource ( + STM_RSC *ResourceList, + uint32_t NumEntries + ) +{ + if (ResourceList != NULL) { + // TBD + //ASSERT (false); + return -1;//EFI_UNSUPPORTED; + } + // + // Delete all + // + memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode)); + mStmResourceSizeUsed = sizeof(mRscEndNode); + mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode); + return 0;//EFI_SUCCESS; +} + +/** + + Get BIOS resources. + + @param ResourceList A pointer to resource list to be filled + @param ResourceSize On input it means size of resource list input. + On output it means size of resource list filled, + or the size of resource list to be filled if size of too small. + + @retval EFI_SUCCESS If resources are returned. + @retval EFI_BUFFER_TOO_SMALL If resource list buffer is too small to hold the whole resources. + +**/ +int32_t +GetPiResource ( + STM_RSC *ResourceList, + uint32_t *ResourceSize + ) +{ + if (*ResourceSize < mStmResourceSizeUsed) { + *ResourceSize = (uint32_t)mStmResourceSizeUsed; + return -1;//EFI_BUFFER_TOO_SMALL; + } + + memcpy (ResourceList, mStmResourcesPtr, mStmResourceSizeUsed); + *ResourceSize = (uint32_t)mStmResourceSizeUsed; + return 0;//EFI_SUCCESS; +} + +/** + Get 4K page aligned VMCS size. + @return 4K page aligned VMCS size + +**/ +uint32_t +GetVmcsSize ( + void + ) +{ + uint32_t ThisVmcsSize; + VMX_BASIC_MSR MsrData64; + int StmSupport; + + MsrData64.msr = rdmsr (IA32_VMX_BASIC_MSR_INDEX); + + ThisVmcsSize = MsrData64.bits.VmcsSize; + StmSupport = MsrData64.bits.StmSupported; + printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport); + + // + // VMCS require 0x1000 alignment + // + ThisVmcsSize = STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (ThisVmcsSize)); + + return ThisVmcsSize; +} + +/** + + Create 4G page table for STM. + 4M Non-PAE page table in IA32 version. + + @param PageTableBase The page table base in MSEG + +**/ +void +StmGen4GPageTableIa32 ( + uint32_t PageTableBase + ) +{ + UINTN Index; + uint32_t *Pte; + uint32_t Address; + + Pte = (uint32_t*)(uint32_t)PageTableBase; + + Address = 0; + for (Index = 0; Index < SIZE_4KB / sizeof (*Pte); Index++) { + *Pte = Address | IA32_PG_PS | IA32_PG_RW | IA32_PG_P; + Pte++; + Address += SIZE_4MB; + } + + return ; +} + +/** + + Create 4G page table for STM. + 2M PAE page table in X64 version. + + @param PageTableBase The page table base in MSEG + +**/ +void +StmGen4GPageTableX64 ( + uint32_t PageTableBase + ) +{ + UINTN Index; + UINTN SubIndex; + uint64_t *Pde; + uint64_t *Pte; + uint64_t *Pml4; + + Pml4 = (uint64_t*)(uint32_t) PageTableBase; + PageTableBase += SIZE_4KB; + *Pml4 = PageTableBase | IA32_PG_RW | IA32_PG_P; + + Pde = (uint64_t*)(uint32_t)PageTableBase; + PageTableBase += SIZE_4KB; + Pte = (uint64_t *)(uint32_t)PageTableBase; + + for (Index = 0; Index < 4; Index++) { + *Pde = PageTableBase | IA32_PG_RW | IA32_PG_P; + Pde++; + PageTableBase += SIZE_4KB; + + for (SubIndex = 0; SubIndex < SIZE_4KB / sizeof (*Pte); SubIndex++) { + *Pte = (((Index << 9) + SubIndex) << 21) | IA32_PG_PS | IA32_PG_RW | IA32_PG_P; + Pte++; + } + } + + return ; +} + +/** + + Check STM image size. + + @param StmImage STM image + @param StmImageSize STM image size + + @retval true check pass + @retval false check fail +**/ + +bool StmCheckStmImage ( + void * StmImage, + uint32_t StmImageSize + ) +{ + UINTN MinMsegSize; + STM_HEADER *StmHeader; + + StmHeader = (STM_HEADER *)StmImage; + + // + // Get Minimal required Mseg size + // + MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) + + StmHeader->SwStmHdr.AdditionalDynamicMemorySize + + (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count); + if (MinMsegSize < StmImageSize) { + MinMsegSize = StmImageSize; + } + + if (StmHeader->HwStmHdr.Cr3Offset >= StmHeader->SwStmHdr.StaticImageSize) { + // + // We will create page table, just in case that SINIT does not create it. + // + if (MinMsegSize < StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6)) { + MinMsegSize = StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6); + } + } + + // + // Check if it exceeds MSEG size + // + if (MinMsegSize > CONFIG_MSEG_SIZE) { + return false; + } + + return true; + +} + + +/** + + Load STM image to MSEG. + + @param StmImage STM image + @param StmImageSize STM image size + +**/ +void +StmLoadStmImage ( + void * StmImage, + UINTN StmImageSize + ) +{ + uint32_t MsegBase; + STM_HEADER *StmHeader; + SMM_MONITOR_CTL_MSR SmmMonitorMsr; + + StmHeader = (STM_HEADER *)(uint32_t)StmImage; + SmmMonitorMsr.msr = rdmsr(IA32_SMM_MONITOR_CTL_MSR_INDEX); + MsegBase = SmmMonitorMsr.bits.MsegAddress << 12; + + //ZeroMem ((void *)(uint32_t)MsegBase, (uint32_t)PcdGet32 (PcdCpuMsegSize)); + + memset((void *) MsegBase, 0, CONFIG_MSEG_SIZE); + //memcpy ((void *)(uint32_t)MsegBase, (void *)(uint32_t)StmImage, StmImageSize); + memcpy((void *) MsegBase, (void *) StmImage, (size_t) StmImageSize); + + + if (sizeof(UINTN) == sizeof(uint64_t)) { + StmGen4GPageTableX64 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset); + } else { + StmGen4GPageTableIa32 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset); + } + + // BUGBUG: SNB can not write 0x9B twice +// WriteCpuMsegInfo (); +} + +/** + + Load STM image to MSEG. + + @param StmImage STM image + @param StmImageSize STM image size + + @retval EFI_SUCCESS Load STM to MSEG successfully + @retval EFI_ALREADY_STARTED STM image is already loaded to MSEG + @retval EFI_BUFFER_TOO_SMALL MSEG is smaller than minimal requirement of STM image + @retval EFI_UNSUPPORTED MSEG is not enabled + +**/ +int LoadMonitor ( + void * StmImage, + uint32_t StmImageSize + ) +{ + SMM_MONITOR_CTL_MSR SmmMonCtlMsr; + + SmmMonCtlMsr.msr = (msr_t) rdmsr(IA32_SMM_MONITOR_CTL_MSR_INDEX); + + if (SmmMonCtlMsr.bits.MsegAddress == 0) { + return STM_UNSUPPORTED; + } + if (SmmMonCtlMsr.bits.valid != 0) { + // BUGBUG: SNB can not write 0x9B twice +// return EFI_ALREADY_STARTED; + } + + if (!StmCheckStmImage (StmImage, StmImageSize)) { + return STM_BUFFER_TOO_SMALL; + } + +#ifdef TPMSUPPORT + // Record STM_HASH to PCR 0, just in case it is NOT TXT launch, we still need provide the evidence. + TpmMeasureAndLogData( + 0, // PcrIndex + TXT_EVTYPE_STM_HASH, // EventType + NULL, // EventLog + 0, // LogLen + (void *)StmImage, // HashData + StmImageSize // HashDataLen + ); +#endif + StmLoadStmImage (StmImage, StmImageSize); + + mStmState |= STM_SM_MONITOR_STATE_ENABLED; + + return STM_SUCCESS; +} + +/** + This function return BIOS STM resource. + Produced by SmmStm. + Comsumed by SmmMpService when Init. + + @return BIOS STM resource +**/ +void * +GetStmResource( + void + ) +{ + return mStmResourcesPtr; +} + diff --git a/src/security/intel/stm/SmmStm.h b/src/security/intel/stm/SmmStm.h new file mode 100644 index 0000000..4442a63 --- /dev/null +++ b/src/security/intel/stm/SmmStm.h @@ -0,0 +1,122 @@ +/** @file + SMM STM support + + Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. + This program and the accompanying materials are licensed and made + available under the terms and conditions of the BSD License which + accompanies this distribution. The full text of the license may + be found at http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED + +**/ + +#ifndef _SMM_STM_H_ +#define _SMM_STM_H_ + +#include "StmApi.h" + +#define IA32_VMX_BASIC_MSR_INDEX 0x480 +#define IA32_VMX_MISC_MSR_INDEX 0x485 +#define IA32_SMM_MONITOR_CTL_MSR_INDEX 0x9B +#define IA32_SMM_MONITOR_VALID (1<<0) + +/** + + Load STM image to MSEG. + + @param StmImage STM image + @param StmImageSize STM image size + + @retval SUCCESS Load STM to MSEG successfully + @retval BUFFER_TOO_SMALL MSEG is smaller than minimal size of STM image + +**/ +int LoadMonitor( + void *StmImage, + uint32_t StmImageSize + ); + +/** + + Add resources in list to database. Allocate new memory areas as needed. + + @param ResourceList A pointer to resource list to be added + @param NumEntries Optional number of entries. + If 0, list must be terminated by END_OF_RESOURCES. + + @retval SUCCESS If resources are added + @retval INVALID_PARAMETER If nested procedure detected resource failer + @retval OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas. + +**/ +int AddPiResource( + STM_RSC *ResourceList, + uint32_t NumEntries + ); + +/** + + Delete resources in list to database. + + @param ResourceList A pointer to resource list to be deleted + NULL means delete all resources. + @param NumEntries Optional number of entries. + If 0, list must be terminated by END_OF_RESOURCES. + + @retval SUCCESS If resources are deleted + @retval NVALID_PARAMETER If nested procedure detected resource failer + +**/ +int DeletePiResource( + STM_RSC *ResourceList, + uint32_t NumEntries + ); + +/** + + Get BIOS resources. + + @param ResourceList A pointer to resource list to be filled + @param ResourceSize On input it means size of resource list input. + On output it means size of resource list filled, + or the size of resource list to be filled if + size of too small. + + @retval SUCCESS If resources are returned. + @retval BUFFER_TOO_SMALL If resource list buffer is too small to + hold the whole resources. + +**/ +int GetPiResource( + STM_RSC *ResourceList, + uint32_t *ResourceSize + ); + +/** + This function notify STM resource change. + + @param StmResource BIOS STM resource + +**/ +void +NotifyStmResourceChange( + void *StmResource + ); + +/** + This function return BIOS STM resource. + + @return BIOS STM resource + +**/ +void * +GetStmResource( + void + ); + +void SetupSmmDescriptor(void *smbase, int32_t state_size, int32_t apic_id, + int32_t entry32_off); + +#endif diff --git a/src/security/intel/stm/StmApi.h b/src/security/intel/stm/StmApi.h new file mode 100644 index 0000000..2328b32 --- /dev/null +++ b/src/security/intel/stm/StmApi.h @@ -0,0 +1,753 @@ +/** @file + STM API definition + + Copyright (c) 2015, Intel Corporation. All rights reserved. + This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#ifndef _STM_API_H_ +#define _STM_API_H_ + +#include <stdint.h> + +// definition in STM spec + +#define STM_SPEC_VERSION_MAJOR 1 +#define STM_SPEC_VERSION_MINOR 0 + +typedef uint64_t UINTN; + +#pragma pack (push, 1) + +#define STM_HARDWARE_FIELD_FILL_TO_2K (2048 - sizeof(uint32_t) * 8) +typedef struct { + uint32_t StmHeaderRevision; + uint32_t MonitorFeatures; + uint32_t GdtrLimit; + uint32_t GdtrBaseOffset; + uint32_t CsSelector; + uint32_t EipOffset; + uint32_t EspOffset; + uint32_t Cr3Offset; + uint8_t Reserved[STM_HARDWARE_FIELD_FILL_TO_2K]; +} HARDWARE_STM_HEADER; + +#define STM_FEATURES_IA32E 0x1 + +typedef struct { + uint32_t Intel64ModeSupported :1; // bitfield + uint32_t EptSupported :1; // bitfield + uint32_t Reserved :30; // must be 0 +} STM_FEAT; + +typedef struct { + uint8_t StmSpecVerMajor; + uint8_t StmSpecVerMinor; + uint16_t Reserved; // must be zero + uint32_t StaticImageSize; + uint32_t PerProcDynamicMemorySize; + uint32_t AdditionalDynamicMemorySize; + STM_FEAT StmFeatures; + uint32_t NumberOfRevIDs; + uint32_t StmSmmRevID[1]; + // + // The total STM_HEADER should be 4K. + // +} SOFTWARE_STM_HEADER; + +typedef struct { + HARDWARE_STM_HEADER HwStmHdr; + SOFTWARE_STM_HEADER SwStmHdr; +} STM_HEADER; + +#define SHA1 1 +#define SHA256 2 +typedef struct { + uint64_t BiosComponentBase; + uint32_t ImageSize; + uint32_t HashAlgorithm; // SHA1 or SHA256 + uint8_t Hash[32]; +} TXT_BIOS_COMPONENT_STATUS; + +#define PAGE_SIZE 4096 +typedef struct { + uint32_t ImageSize; + uint32_t Reserved; + uint64_t ImagePageBase[1]; //[NumberOfPages]; +} TXT_BIOS_COMPONENT_UPDATE; + +// If (ImageSizeInBytes % PAGE_SIZE == 0) { +// NumberOfPages = ImageSizeInBytes / PAGE_SIZE +// } else { +// NumberOfPages = ImageSizeInBytes / PAGE_SIZE + 1 +// } + + +typedef struct { + uint64_t SpeRip; + uint64_t SpeRsp; + uint16_t SpeSs; + uint16_t PageViolationException:1; + uint16_t MsrViolationException:1; + uint16_t RegisterViolationException:1; + uint16_t IoViolationException:1; + uint16_t PciViolationException:1; + uint16_t Reserved1:11; + uint32_t Reserved2; +} STM_PROTECTION_EXCEPTION_HANDLER; + +typedef struct { + uint8_t ExecutionDisableOutsideSmrr:1; + uint8_t Intel64Mode:1; + uint8_t Cr4Pae : 1; + uint8_t Cr4Pse : 1; + uint8_t Reserved1 : 4; +} STM_SMM_ENTRY_STATE; + +typedef struct { + uint8_t SmramToVmcsRestoreRequired : 1; // BIOS restore hint + uint8_t ReinitializeVmcsRequired : 1; // BIOS request + uint8_t Reserved2 : 6; +} STM_SMM_RESUME_STATE; + +typedef struct { + uint8_t DomainType : 4; // STM input to BIOS on each SM + uint8_t XStatePolicy : 2; // STM input to BIOS on each SMI + uint8_t EptEnabled : 1; + uint8_t Reserved3 : 1; +} STM_SMM_STATE; + +typedef struct { + uint64_t Signature; + uint16_t Size; + uint8_t SmmDescriptorVerMajor; + uint8_t SmmDescriptorVerMinor; + uint32_t LocalApicId; + STM_SMM_ENTRY_STATE SmmEntryState; + STM_SMM_RESUME_STATE SmmResumeState; + STM_SMM_STATE StmSmmState; + uint8_t Reserved4; + uint16_t SmmCs; + uint16_t SmmDs; + uint16_t SmmSs; + uint16_t SmmOtherSegment; + uint16_t SmmTr; + uint16_t Reserved5; + uint64_t SmmCr3; + uint64_t SmmStmSetupRip; + uint64_t SmmStmTeardownRip; + uint64_t SmmSmiHandlerRip; + uint64_t SmmSmiHandlerRsp; + uint64_t SmmGdtPtr; + uint32_t SmmGdtSize; + uint32_t RequiredStmSmmRevId; + STM_PROTECTION_EXCEPTION_HANDLER StmProtectionExceptionHandler; + uint64_t Reserved6; + uint64_t BiosHwResourceRequirementsPtr; + // extend area + uint64_t AcpiRsdp; + uint8_t PhysicalAddressBits; +} TXT_PROCESSOR_SMM_DESCRIPTOR; + +#define TXT_PROCESSOR_SMM_DESCRIPTOR_SIGNATURE "TXTPSSIG" +#define TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MAJOR 1 +#define TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MINOR 0 + +#define SMM_PSD_OFFSET 0xfb00 + +typedef enum { + TxtSmmPageViolation = 1, + TxtSmmMsrViolation, + TxtSmmRegisterViolation, + TxtSmmIoViolation, + TxtSmmPciViolation +} TXT_SMM_PROTECTION_EXCEPTION_TYPE; + +typedef struct { + uint32_t Rdi; + uint32_t Rsi; + uint32_t Rbp; + uint32_t Rdx; + uint32_t Rcx; + uint32_t Rbx; + uint32_t Rax; + uint32_t Cr3; + uint32_t Cr2; + uint32_t Cr0; + uint32_t VmcsExitInstructionInfo; + uint32_t VmcsExitInstructionLength; + uint64_t VmcsExitQualification; + uint32_t ErrorCode; // TXT_SMM_PROTECTION_EXCEPTION_TYPE + uint32_t Rip; + uint32_t Cs; + uint32_t Rflags; + uint32_t Rsp; + uint32_t Ss; +} STM_PROTECTION_EXCEPTION_STACK_FRAME_IA32; + +typedef struct { + uint64_t R15; + uint64_t R14; + uint64_t R13; + uint64_t R12; + uint64_t R11; + uint64_t R10; + uint64_t R9; + uint64_t R8; + uint64_t Rdi; + uint64_t Rsi; + uint64_t Rbp; + uint64_t Rdx; + uint64_t Rcx; + uint64_t Rbx; + uint64_t Rax; + uint64_t Cr8; + uint64_t Cr3; + uint64_t Cr2; + uint64_t Cr0; + uint64_t VmcsExitInstructionInfo; + uint64_t VmcsExitInstructionLength; + uint64_t VmcsExitQualification; + uint64_t ErrorCode; // TXT_SMM_PROTECTION_EXCEPTION_TYPE + uint64_t Rip; + uint64_t Cs; + uint64_t Rflags; + uint64_t Rsp; + uint64_t Ss; +} STM_PROTECTION_EXCEPTION_STACK_FRAME_X64; + +typedef union { + STM_PROTECTION_EXCEPTION_STACK_FRAME_IA32 *Ia32StackFrame; + STM_PROTECTION_EXCEPTION_STACK_FRAME_X64 *X64StackFrame; +} STM_PROTECTION_EXCEPTION_STACK_FRAME; + +#define STM_SMM_REV_ID 0x80010100 + +typedef struct _STM_SMM_CPU_STATE { + uint8_t Reserved1[0x1d0]; // fc00h + uint32_t GdtBaseHiDword; // fdd0h : NO + uint32_t LdtBaseHiDword; // fdd4h : NO + uint32_t IdtBaseHiDword; // fdd8h : NO + uint8_t Reserved2[0x4]; // fddch + uint64_t IoRdi; // fde0h : NO + // - restricted + uint64_t IoEip; // fde8h : YES + uint64_t IoRcx; // fdf0h : NO + // - restricted + uint64_t IoRsi; // fdf8h : NO + // - restricted + uint8_t Reserved3[0x40]; // fe00h + uint32_t Cr4; // fe40h : NO + uint8_t Reserved4[0x48]; // fe44h + uint32_t GdtBaseLoDword; // fe8ch : NO + uint32_t GdtLimit; // fe90h : NO + // - RESTRICTED + uint32_t IdtBaseLoDword; // fe94h : NO + uint32_t IdtLimit; // fe98h : NO + // - RESTRICTED + uint32_t LdtBaseLoDword; // fe9ch : NO + uint32_t LdtLimit; // fea0h : NO + // - RESTRICTED + uint32_t LdtInfo; // fea4h : NO + // - RESTRICTED + uint8_t Reserved5[0x30]; // fea8h + uint64_t Eptp; // fed8h : NO + uint32_t EnabledEPT; // fee0h : NO + uint8_t Reserved6[0x14]; // fee4h + uint32_t Smbase; // fef8h : YES + // - NO for STM + uint32_t SMMRevId; // fefch : NO + uint16_t IORestart; // ff00h : YES + uint16_t AutoHALTRestart; // ff02h : YES + uint8_t Reserved7[0x18]; // ff04h + uint64_t R15; // ff1ch : YES + uint64_t R14; // ff24h : YES + uint64_t R13; // ff2ch : YES + uint64_t R12; // ff34h : YES + uint64_t R11; // ff3ch : YES + uint64_t R10; // ff44h : YES + uint64_t R9; // ff4ch : YES + uint64_t R8; // ff54h : YES + uint64_t Rax; // ff5ch : YES + uint64_t Rcx; // ff64h : YES + uint64_t Rdx; // ff6ch : YES + uint64_t Rbx; // ff74h : YES + uint64_t Rsp; // ff7ch : YES + uint64_t Rbp; // ff84h : YES + uint64_t Rsi; // ff8ch : YES + uint64_t Rdi; // ff94h : YES + uint64_t IOMemAddr; // ff9ch : NO + uint32_t IOMisc; // ffa4h : NO + uint32_t Es; // ffa8h : NO + uint32_t Cs; // ffach : NO + uint32_t Ss; // ffb0h : NO + uint32_t Ds; // ffb4h : NO + uint32_t Fs; // ffb8h : NO + uint32_t Gs; // ffbch : NO + uint32_t Ldtr; // ffc0h : NO + uint32_t Tr; // ffc4h : NO + uint64_t Dr7; // ffc8h : NO + uint64_t Dr6; // ffd0h : NO + uint64_t Rip; // ffd8h : YES + uint64_t Ia32Efer; // ffe0h : YES + // - NO for STM + uint64_t Rflags; // ffe8h : YES + uint64_t Cr3; // fff0h : NO + uint64_t Cr0; // fff8h : NO +} STM_SMM_CPU_STATE; + +// +// STM Mapping +// + +typedef struct { + uint64_t PhysicalAddress; + uint64_t VirtualAddress; + uint32_t PageCount; + uint32_t PatCacheType; +} STM_MAP_ADDRESS_RANGE_DESCRIPTOR; +#define ST_UC 0x00 +#define WC 0x01 +#define WT 0x04 +#define WP 0x05 +#define WB 0x06 +#define UC 0x07 +#define FOLLOW_MTRR 0xFFFFFFFF + +typedef struct { + uint64_t VirtualAddress; + uint32_t Length; +} STM_UNMAP_ADDRESS_RANGE_DESCRIPTOR; + +typedef struct { + uint64_t InterruptedGuestVirtualAddress; + uint32_t Length; + uint64_t InterruptedCr3; + uint64_t InterruptedEptp; + uint32_t MapToSmmGuest:2; + uint32_t InterruptedCr4Pae:1; + uint32_t InterruptedCr4Pse:1; + uint32_t InterruptedIa32eMode:1; + uint32_t Reserved1:27; + uint32_t Reserved2; + uint64_t PhysicalAddress; + uint64_t SmmGuestVirtualAddress; +} STM_ADDRESS_LOOKUP_DESCRIPTOR; +#define DO_NOT_MAP 0 +#define ONE_TO_ONE 1 +#define VIRTUAL_ADDRESS_SPECIFIED 3 + +// +// STM_RESOURCE_LIST +// +#define END_OF_RESOURCES 0 +#define MEM_RANGE 1 +#define IO_RANGE 2 +#define MMIO_RANGE 3 +#define MACHINE_SPECIFIC_REG 4 +#define PCI_CFG_RANGE 5 +#define TRAPPED_IO_RANGE 6 +#define ALL_RESOURCES 7 +#define REGISTER_VIOLATION 8 +#define MAX_DESC_TYPE 8 + +typedef struct { + uint32_t RscType; + uint16_t Length; + uint16_t ReturnStatus:1; + uint16_t Reserved:14; + uint16_t IgnoreResource:1; +} STM_RSC_DESC_HEADER; + +typedef struct { + STM_RSC_DESC_HEADER Hdr; + uint64_t ResourceListContinuation; +} STM_RSC_END; + +// byte granular Memory range support +#define STM_RSC_BGM 0x4 + +typedef struct { + STM_RSC_DESC_HEADER Hdr; + uint64_t Base; + uint64_t Length; + uint32_t RWXAttributes:3; + uint32_t Reserved:29; + uint32_t Reserved_2; +} STM_RSC_MEM_DESC; +#define STM_RSC_MEM_R 0x1 +#define STM_RSC_MEM_W 0x2 +#define STM_RSC_MEM_X 0x4 + +typedef struct { + STM_RSC_DESC_HEADER Hdr; + uint16_t Base; + uint16_t Length; + uint32_t Reserved; +} STM_RSC_IO_DESC; + +// byte granular MMIO range support +#define STM_RSC_BGI 0x2 + +typedef struct { + STM_RSC_DESC_HEADER Hdr; + uint64_t Base; + uint64_t Length; + uint32_t RWXAttributes:3; + uint32_t Reserved:29; + uint32_t Reserved_2; +} STM_RSC_MMIO_DESC; +#define STM_RSC_MMIO_R 0x1 +#define STM_RSC_MMIO_W 0x2 +#define STM_RSC_MMIO_X 0x4 + +typedef struct { + STM_RSC_DESC_HEADER Hdr; + uint32_t MsrIndex; + uint32_t KernelModeProcessing:1; + uint32_t Reserved:31; + uint64_t ReadMask; + uint64_t WriteMask; +} STM_RSC_MSR_DESC; + +// bit granular MSR resource support +#define STM_RSC_MSR 0x8 + +typedef struct { + uint8_t Type; // must be 1, indicating Hardware Device Path + uint8_t Subtype; // must be 1, indicating PCI + uint16_t Length; // sizeof(STM_PCI_DEVICE_PATH_NODE) which is 6 + uint8_t PciFunction; + uint8_t PciDevice; +} STM_PCI_DEVICE_PATH_NODE; +typedef struct { + STM_RSC_DESC_HEADER Hdr; + uint16_t RWAttributes:2; + uint16_t Reserved:14; + uint16_t Base; + uint16_t Length; + uint8_t OriginatingBusNumber; + uint8_t LastNodeIndex; + STM_PCI_DEVICE_PATH_NODE PciDevicePath[1]; +//STM_PCI_DEVICE_PATH_NODE PciDevicePath[LastNodeIndex + 1]; +} STM_RSC_PCI_CFG_DESC; + +#define STM_RSC_PCI_CFG_R 0x1 +#define STM_RSC_PCI_CFG_W 0x2 + +typedef struct { + STM_RSC_DESC_HEADER Hdr; + uint16_t Base; + uint16_t Length; + uint16_t In:1; + uint16_t Out:1; + uint16_t Api:1; + uint16_t Reserved1:13; + uint16_t Reserved2; +} STM_RSC_TRAPPED_IO_DESC; + +typedef struct { + STM_RSC_DESC_HEADER Hdr; +} STM_RSC_ALL_RESOURCES_DESC; + +typedef struct { + STM_RSC_DESC_HEADER Hdr; + uint32_t RegisterType; + uint32_t Reserved; + uint64_t ReadMask; + uint64_t WriteMask; +} STM_REGISTER_VIOLATION_DESC; + +typedef enum { + StmRegisterCr0, + StmRegisterCr2, + StmRegisterCr3, + StmRegisterCr4, + StmRegisterCr8, + StmRegisterMax, +} STM_REGISTER_VIOLATION_TYPE; + +typedef union { + STM_RSC_DESC_HEADER Header; + STM_RSC_END End; + STM_RSC_MEM_DESC Mem; + STM_RSC_IO_DESC Io; + STM_RSC_MMIO_DESC Mmio; + STM_RSC_MSR_DESC Msr; + STM_RSC_PCI_CFG_DESC PciCfg; + STM_RSC_TRAPPED_IO_DESC TrappedIo; + STM_RSC_ALL_RESOURCES_DESC All; + STM_REGISTER_VIOLATION_DESC RegisterViolation; +} STM_RSC; + +// +// VMCS database +// +#define STM_VMCS_DATABASE_REQUEST_ADD 1 +#define STM_VMCS_DATABASE_REQUEST_REMOVE 0 + +// Values for DomainType +// Intepreter of DomainType +#define DOMAIN_DISALLOWED_IO_OUT (1u << 0) +#define DOMAIN_DISALLOWED_IO_IN (1u << 1) +#define DOMAIN_INTEGRITY (1u << 2) +#define DOMAIN_CONFIDENTIALITY (1u << 3) + +#define DOMAIN_UNPROTECTED 0x00 +#define DOMAIN_INTEGRITY_PROT_OUT_IN (DOMAIN_INTEGRITY) +//#define DOMAIN_INTEGRITY_PROT_OUT (DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN) +#define DOMAIN_FULLY_PROT_OUT_IN (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY) +//#define DOMAIN_FULLY_PROT_IN (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_OUT) +//#define DOMAIN_FULLY_PROT_OUT (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN) +#define DOMAIN_FULLY_PROT (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN | DOMAIN_DISALLOWED_IO_OUT) + +// Values for XStatePolicy +#define XSTATE_READWRITE 0x00 +#define XSTATE_READONLY 0x01 +#define XSTATE_SCRUB 0x03 + +typedef struct { + uint64_t VmcsPhysPointer; // bits 11:0 are reserved and must be 0 + uint32_t DomainType :4; + uint32_t XStatePolicy :2; + uint32_t DegradationPolicy :4; + uint32_t Reserved1 :22; // Must be 0 + uint32_t AddOrRemove; +} STM_VMCS_DATABASE_REQUEST; + +// +// Event log +// +#define NEW_LOG 1 +#define CONFIGURE_LOG 2 +#define START_LOG 3 +#define STOP_LOG 4 +#define CLEAR_LOG 5 +#define DELETE_LOG 6 +typedef enum { + EvtLogStarted, + EvtLogStopped, + EvtLogInvalidParameterDetected, + EvtHandledProtectionException, + // unhandled protection exceptions result in reset & cannot be logged + EvtBiosAccessToUnclaimedResource, + EvtMleResourceProtectionGranted, + EvtMleResourceProtectionDenied, + EvtMleResourceUnprotect, + EvtMleResourceUnprotectError, + EvtMleDomainTypeDegraded, + // add more here + EvtMleMax, + // Not used + EvtInvalid = 0xFFFFFFFF, +} EVENT_TYPE; + +//#define STM_EVENT_LOG_PAGE_COUNT_MAX 62 + +typedef struct { + uint32_t PageCount; + uint64_t Pages[1]; // number of elements is PageCount +} STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA_LOG_BUFFER; + +typedef union { + STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA_LOG_BUFFER LogBuffer; + uint32_t EventEnableBitmap; // bitmap of EVENT_TYPE +} STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA; + +typedef struct { + uint32_t SubFunctionIndex; + STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA Data; +} STM_EVENT_LOG_MANAGEMENT_REQUEST; + +// +// VMCALL API Numbers +// + +// API number convention: BIOS facing VMCALL interfaces have bit 16 clear +#define STM_API_MAP_ADDRESS_RANGE 0x00000001 +#define STM_API_UNMAP_ADDRESS_RANGE 0x00000002 +#define STM_API_ADDRESS_LOOKUP 0x00000003 +#define STM_API_RETURN_FROM_PROTECTION_EXCEPTION 0x00000004 + +// API number convention: MLE facing VMCALL interfaces have bit 16 set +// +// The STM configuration lifecycle is as follows: +// 1. SENTER->SINIT->MLE: MLE begins execution with SMI disabled (masked). +// 2. MLE invokes InitializeProtectionVMCALL() to prepare STM for setup of +// initial protection profile. This is done on a single CPU and has global +// effect. +// 3. MLE invokes ProtectResourceVMCALL() to define the initial protection +// profile. The protection profile is global across all CPUs. +// 4. MLE invokes StartStmVMCALL() to enable the STM to begin receiving SMI +// events. This must be done on every logical CPU. +// 5. MLE may invoke ProtectResourceVMCALL() or UnProtectResourceVMCALL() +// during runtime as many times as necessary. +// 6. MLE invokes StopStmVMCALL() to disable the STM. SMI is again masked +// following StopStmVMCALL(). +// +#define STM_API_START 0x00010001 +#define STM_API_STOP 0x00010002 +#define STM_API_PROTECT_RESOURCE 0x00010003 +#define STM_API_UNPROTECT_RESOURCE 0x00010004 +#define STM_API_GET_BIOS_RESOURCES 0x00010005 +#define STM_API_MANAGE_VMCS_DATABASE 0x00010006 +#define STM_API_INITIALIZE_PROTECTION 0x00010007 +#define STM_API_MANAGE_EVENT_LOG 0x00010008 + +// +// Return codes +// +typedef uint32_t STM_STATUS; + +#define STM_SUCCESS 0x00000000 +#define SMM_SUCCESS 0x00000000 +// all error codes have bit 31 set +// STM errors have bit 16 set +#define ERROR_STM_SECURITY_VIOLATION 0x80010001 +#define ERROR_STM_CACHE_TYPE_NOT_SUPPORTED 0x80010002 +#define ERROR_STM_PAGE_NOT_FOUND 0x80010003 +#define ERROR_STM_BAD_CR3 0x80010004 +#define ERROR_STM_PHYSICAL_OVER_4G 0x80010005 +#define ERROR_STM_VIRTUAL_SPACE_TOO_SMALL 0x80010006 +#define ERROR_STM_UNPROTECTABLE_RESOURCE 0x80010007 +#define ERROR_STM_ALREADY_STARTED 0x80010008 +#define ERROR_STM_WITHOUT_SMX_UNSUPPORTED 0x80010009 +#define ERROR_STM_STOPPED 0x8001000A +#define ERROR_STM_BUFFER_TOO_SMALL 0x8001000B +#define ERROR_STM_INVALID_VMCS_DATABASE 0x8001000C +#define ERROR_STM_MALFORMED_RESOURCE_LIST 0x8001000D +#define ERROR_STM_INVALID_PAGECOUNT 0x8001000E +#define ERROR_STM_LOG_ALLOCATED 0x8001000F +#define ERROR_STM_LOG_NOT_ALLOCATED 0x80010010 +#define ERROR_STM_LOG_NOT_STOPPED 0x80010011 +#define ERROR_STM_LOG_NOT_STARTED 0x80010012 +#define ERROR_STM_RESERVED_BIT_SET 0x80010013 +#define ERROR_STM_NO_EVENTS_ENABLED 0x80010014 +#define ERROR_STM_OUT_OF_RESOURCES 0x80010015 +#define ERROR_STM_FUNCTION_NOT_SUPPORTED 0x80010016 +#define ERROR_STM_UNPROTECTABLE 0x80010017 +#define ERROR_STM_UNSUPPORTED_MSR_BIT 0x80010018 +#define ERROR_STM_UNSPECIFIED 0x8001FFFF + +// SMM errors have bit 17 set +#define ERROR_SMM_BAD_BUFFER 0x80020001 +#define ERROR_SMM_INVALID_RSC 0x80020004 +#define ERROR_SMM_INVALID_BUFFER_SIZE 0x80020005 +#define ERROR_SMM_BUFFER_TOO_SHORT 0x80020006 +#define ERROR_SMM_INVALID_LIST 0x80020007 +#define ERROR_SMM_OUT_OF_MEMORY 0x80020008 +#define ERROR_SMM_AFTER_INIT 0x80020009 +#define ERROR_SMM_UNSPECIFIED 0x8002FFFF + +// Errors that apply to both have bits 15, 16, and 17 set +#define ERROR_INVALID_API 0x80038001 +#define ERROR_INVALID_PARAMETER 0x80038002 + +// +// STM TXT.ERRORCODE codes +// +#define STM_CRASH_PROTECTION_EXCEPTION 0xC000F001 +#define STM_CRASH_PROTECTION_EXCEPTION_FAILURE 0xC000F002 +#define STM_CRASH_DOMAIN_DEGRADATION_FAILURE 0xC000F003 +#define STM_CRASH_BIOS_PANIC 0xC000E000 + +typedef struct { + uint32_t EventSerialNumber; + uint16_t Type; + uint16_t Lock :1; + uint16_t Valid :1; + uint16_t ReadByMle :1; + uint16_t Wrapped :1; + uint16_t Reserved :12; +} LOG_ENTRY_HEADER; + +typedef struct { + uint32_t Reserved; +} ENTRY_EVT_LOG_STARTED; + +typedef struct { + uint32_t Reserved; +} ENTRY_EVT_LOG_STOPPED; + +typedef struct { + uint32_t VmcallApiNumber; +} ENTRY_EVT_LOG_INVALID_PARAM; + +typedef struct { + STM_RSC Resource; +} ENTRY_EVT_LOG_HANDLED_PROTECTION_EXCEPTION; + +typedef struct { + STM_RSC Resource; +} ENTRY_EVT_BIOS_ACCESS_UNCLAIMED_RSC; + +typedef struct { + STM_RSC Resource; +} ENTRY_EVT_MLE_RSC_PROT_GRANTED; + +typedef struct { + STM_RSC Resource; +} ENTRY_EVT_MLE_RSC_PROT_DENIED; + +typedef struct { + STM_RSC Resource; +} ENTRY_EVT_MLE_RSC_UNPROT; + +typedef struct { + STM_RSC Resource; +} ENTRY_EVT_MLE_RSC_UNPROT_ERROR; + +typedef struct { + uint64_t VmcsPhysPointer; + uint8_t ExpectedDomainType; + uint8_t DegradedDomainType; +} ENTRY_EVT_MLE_DOMAIN_TYPE_DEGRADED; + +typedef union { + ENTRY_EVT_LOG_STARTED Started; + ENTRY_EVT_LOG_STOPPED Stopped; + ENTRY_EVT_LOG_INVALID_PARAM InvalidParam; + ENTRY_EVT_LOG_HANDLED_PROTECTION_EXCEPTION HandledProtectionException; + ENTRY_EVT_BIOS_ACCESS_UNCLAIMED_RSC BiosUnclaimedRsc; + ENTRY_EVT_MLE_RSC_PROT_GRANTED MleRscProtGranted; + ENTRY_EVT_MLE_RSC_PROT_DENIED MleRscProtDenied; + ENTRY_EVT_MLE_RSC_UNPROT MleRscUnprot; + ENTRY_EVT_MLE_RSC_UNPROT_ERROR MleRscUnprotError; + ENTRY_EVT_MLE_DOMAIN_TYPE_DEGRADED MleDomainTypeDegraded; +} LOG_ENTRY_DATA; + +typedef struct { + LOG_ENTRY_HEADER Hdr; + LOG_ENTRY_DATA Data; +} STM_LOG_ENTRY; + +#define STM_LOG_ENTRY_SIZE 256 + +// +// +// +#define STM_CONFIG_SMI_UNBLOCKING_BY_VMX_OFF 0x1 + +// +// TXT debug +// +#define SW_SMI_STM_ADD_RUNTIME_RESOURCES_SUB_FUNC 0 +#define SW_SMI_STM_READ_BIOS_RESOURCES_SUB_FUNC 1 +#define SW_SMI_STM_REPLACE_BIOS_RESOURCES_SUB_FUNC 2 + +typedef struct { + uint32_t BufferSize; + uint32_t Reserved; + //uint8_t Data[]; +} TXT_BIOS_DEBUG; + +#pragma pack (pop) + +#endif diff --git a/src/security/intel/stm/StmPlatformResource.c b/src/security/intel/stm/StmPlatformResource.c new file mode 100644 index 0000000..ad8a69b --- /dev/null +++ b/src/security/intel/stm/StmPlatformResource.c @@ -0,0 +1,259 @@ +/** @file + STM platform SMM resource + + Copyright (c) 2015, Intel Corporation. All rights reserved. + This program and the accompanying materials are licensed and made + available under the terms and conditions of the BSD License which + accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include <stdint.h> +#include <security/intel/stm/StmApi.h> +#include <security/intel/stm/SmmStm.h> +#include <security/intel/stm/StmPlatformResource.h> + +#include <southbridge/intel/common/pmutil.h> +#include <cpu/x86/msr.h> + +#define RDWR_ACCS 3 +#define FULL_ACCS 7 + +uint32_t mMaxBus; +uint32_t mTsegBase; +uint32_t mTsegSize; +uint16_t mPmBase; + +typedef union { + uint64_t uint64; + msr_t msr; +} msr64_t; + +//uint64_t PciRead64 (UINTN Address); +void ResourceInit(void); +void FixupPciexResource(void); +void AddSimpleResources(void); +void AddMsrResources(void); + +// +// Fixed memory ranges +// + +// +// TSEG memory! +// +STM_RSC_MEM_DESC RscTsegMemory = { + {MEM_RANGE, sizeof (STM_RSC_MEM_DESC)}, + 0, + 0, + FULL_ACCS +}; +// +// Flash part +// +STM_RSC_MEM_DESC RscSpiMemory = { + {MEM_RANGE, sizeof (STM_RSC_MEM_DESC)}, + 0xFE000000, + 0x01000000, + FULL_ACCS +}; +// +// ACPI +// +STM_RSC_IO_DESC RscPmIo = { + {IO_RANGE, sizeof (STM_RSC_IO_DESC)}, + 0, + 128 +}; + +// +// PCIE MMIO +// +STM_RSC_MMIO_DESC RscPcieMmio = { + {MMIO_RANGE, sizeof (STM_RSC_MMIO_DESC)}, + 0, + 0, // Length + RDWR_ACCS +}; +// +// Local APIC +// +STM_RSC_MMIO_DESC RscApicMmio = { + {MMIO_RANGE, sizeof (STM_RSC_MMIO_DESC)}, + 0, + 0x400, + RDWR_ACCS +}; +// +// Software SMI +// +STM_RSC_TRAPPED_IO_DESC RscSwSmiTrapIo = { + {TRAPPED_IO_RANGE, sizeof (STM_RSC_TRAPPED_IO_DESC)}, + 0xB2, + 2 +}; +// +// End of list +// +STM_RSC_END RscListEnd = { + {END_OF_RESOURCES, sizeof (STM_RSC_END)}, + 0 +}; + +// +// Common PCI devices +// +// +// LPC bridge +// +STM_RSC_PCI_CFG_DESC RscLpcBridgePci = { + {PCI_CFG_RANGE, sizeof (STM_RSC_PCI_CFG_DESC)}, + RDWR_ACCS, 0, + 0, + 0x1000, + 0, + 0, + { + {1, 1, sizeof(STM_PCI_DEVICE_PATH_NODE), LPC_FUNCTION, LPC_DEVICE}, + }, +}; + +// +// Template for MSR resources. +// +STM_RSC_MSR_DESC RscMsrTpl = { + {MACHINE_SPECIFIC_REG, sizeof (STM_RSC_MSR_DESC)}, +}; + +// +// MSR indices to register +// +typedef struct { + uint32_t MsrIndex; + uint64_t ReadMask; + uint64_t WriteMask; +} MSR_TABLE_ENTRY; + +MSR_TABLE_ENTRY MsrTable[] = { + // Index Read Write // MASK64 means need access, MASK0 means no need access. + {SMRR_PHYSBASE_MSR, MASK64, MASK0}, + {SMRR_PHYSMASK_MSR, MASK64, MASK0}, +}; + +/** + + BIOS resources initialization. + +**/ +void ResourceInit(void) +{ + mMaxBus = 255; + + msr_t MsrRead; + + mPmBase = get_pmbase(); + + //mTsegBase = (uint32_t)rdmsr(SMRR_PHYSBASE_MSR) & 0xFFFFF000; + + MsrRead = rdmsr(SMRR_PHYSBASE_MSR); + mTsegBase = MsrRead.lo & 0xFFFFF000; + + //mTsegSize = (uint32_t)(~((uint32_t)rdmsr(SMRR_PHYSMASK_MSR) & 0xFFFFF000) + 1); + + MsrRead = rdmsr(SMRR_PHYSMASK_MSR); + mTsegSize = (~(MsrRead.lo & 0xFFFFF000) + 1); +} + +/** + + Fix up PCIE resource. + +**/ +void FixupPciexResource(void) +{ + // bug, bug, need to fix for coreboot + // + // Find max bus number and PCIEX length + // + //RscPcieMmio.Length = 0x10000000; // 256 MB + //RscPcieMmio.Base = PcdGet64 (PcdPciExpressBaseAddress); +} + +/** + + Add basic resources to BIOS resource database. + +**/ +void +AddSimpleResources(void) +{ + int Status; + msr64_t ReadMsr; + + // + // Fix-up values + // + RscTsegMemory.Base = mTsegBase; + RscTsegMemory.Length = mTsegSize; + + RscPmIo.Base = (uint16_t) mPmBase; + + // + // Local APIC. We assume that all thteads are programmed identically + // despite that it is possible to have individual APIC address for + // each of the threads. If this is the case this programming should + // be corrected. + // + //RscApicMmio.Base = AsmReadMsr64 (IA32_APIC_BASE_MSR_INDEX) & 0xFFFFFF000ull; + + ReadMsr.msr = rdmsr(IA32_APIC_BASE_MSR_INDEX); + RscApicMmio.Base = ReadMsr.uint64 & 0xFFFFFF000ull; + + // + // PCIEX BAR + // + FixupPciexResource (); + + Status = AddPiResource((void *) &RscTsegMemory, 0); + //ASSERT_EFI_ERROR (Status); + Status = AddPiResource((void *) &RscLpcBridgePci, 1); + //ASSERT_EFI_ERROR (Status); +} + +/** + + Add MSR resources to BIOS resource database. + +**/ +void AddMsrResources(void) +{ + uint32_t Status; + uint32_t Index; + + for (Index = 0; Index < sizeof(MsrTable)/sizeof(MsrTable[0]); Index ++) { + + RscMsrTpl.MsrIndex = (uint32_t) MsrTable[Index].MsrIndex; + RscMsrTpl.ReadMask = (uint64_t) MsrTable[Index].ReadMask; + RscMsrTpl.WriteMask = (uint64_t) MsrTable[Index].WriteMask; + + Status = AddPiResource ((void *) &RscMsrTpl, 1); + } +} + +/** + + Add resources to BIOS resource database. + +**/ +void AddResourcesCmd(void) +{ + ResourceInit(); + + AddSimpleResources(); + + AddMsrResources(); +} diff --git a/src/security/intel/stm/StmPlatformResource.h b/src/security/intel/stm/StmPlatformResource.h new file mode 100644 index 0000000..e31e74b --- /dev/null +++ b/src/security/intel/stm/StmPlatformResource.h @@ -0,0 +1,43 @@ +/** @file + STM platform SMM resource + + Copyright (c) 2015, Intel Corporation. All rights reserved. + This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#ifndef _STM_PLATFORM_RESOURCE_H_ +#define _STM_PLATFORM_RESOURCE_H_ + +#define MASK0 0 +#define MASK64 0xFFFFFFFFFFFFFFFFull + +// +// LPC +// +#define LPC_BUS 0 +#define LPC_DEVICE 31 +#define LPC_FUNCTION 0 +#define R_ACPI_PM_BASE 0x40 +#define ACPI_PM_BASE_MASK 0xFFF8 + +// +// MSRs +// +#define IA32_APIC_BASE_MSR_INDEX 0x1B +#define SMRR_PHYSBASE_MSR 0x1F2 +#define SMRR_PHYSMASK_MSR 0x1F3 + +/** + + Add resources to BIOS resource database. + +**/ +void AddResourcesCmd(void); +#endif diff --git a/src/security/intel/stm/StmPlatformSmm.c b/src/security/intel/stm/StmPlatformSmm.c new file mode 100644 index 0000000..bd9cea5 --- /dev/null +++ b/src/security/intel/stm/StmPlatformSmm.c @@ -0,0 +1,128 @@ +/** @file + STM platform SMM API + + Copyright (c) 2015, Intel Corporation. All rights reserved. + This program and the accompanying materials are licensed and made + available under the terms and conditions of the BSD License which + accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include <security/intel/stm/StmApi.h> +#include <security/intel/stm/SmmStm.h> +#include <cpu/x86/smm.h> + +#include <stddef.h> +#include <cbfs.h> +#include <console/console.h> +#include <lib.h> +#include <stdint.h> + +int LoadStmImage(uint32_t mseg); + +extern bool StmCheckStmImage(void *StmImage, uint32_t StmImageSize); +extern void StmGen4GPageTableIa32(uint32_t PageTableBase); +extern void StmGen4GPageTableX64(uint32_t PageTableBase); + +/** + Load STM image. + + @retval EFI_SUCCESS STM is loaded to MSEG + @retval EFI_BUFFER_TOO_SMALL MSEG is too small + @retval EFI_UNSUPPORTED MSEG is not enabled +**/ +int LoadStmImage(uint32_t mseg) +{ + int Status; + void *MsegBase; + uint32_t StmBufferSize; + uint32_t StmImageSize; + bool StmStatus; + + STM_HEADER *StmHeader; + + // + // Extract STM image from FV + // + MsegBase = (void *) mseg; + StmBufferSize = CONFIG_MSEG_SIZE; + StmImageSize = 0; + + memset((void *) MsegBase, 0, CONFIG_MSEG_SIZE); // clear the mseg + + StmImageSize = cbfs_boot_load_file("stm.bin", MsegBase, StmBufferSize, CBFS_TYPE_RAW); + printk(BIOS_DEBUG, "STM loaded into mseg: 0x%08x size: %u \n", (uint32_t) MsegBase, StmImageSize); /* status is number of bytes loaded */ + + StmStatus = StmCheckStmImage(MsegBase, StmImageSize); + + StmHeader = MsegBase; + + StmGen4GPageTableX64 ((uint32_t)MsegBase + StmHeader->HwStmHdr.Cr3Offset); + + // Debug stuff + + printk(BIOS_DEBUG, "STM Header - Revision: 0x%08x Features: 0x%08x ... Cr3Offset: 0x%08x\n", + StmHeader->HwStmHdr.StmHeaderRevision, + StmHeader->HwStmHdr.MonitorFeatures, + StmHeader->HwStmHdr.Cr3Offset); + printk(BIOS_DEBUG, "STM Header - StaticImageSize: %d Cr3Location: 0x%08x \n", + StmHeader->SwStmHdr.StaticImageSize, + ((uint32_t) MsegBase + StmHeader->HwStmHdr.Cr3Offset)); + + Status = 0; // always return good for now + + return Status; +} + +struct descriptor +{ + uint16_t limit; + uintptr_t base; +} __attribute__((packed)); + + +void ReadGdtr( struct descriptor *gdtr); + +void ReadGdtr( struct descriptor *gdtr) +{ + __asm__ __volatile__ ( + "sgdt %0" + : "=m" (*gdtr) + ); +} + +void SetupSmmDescriptor(void *smbase, int32_t state_size, int32_t apic_id, int32_t entry32_off) +{ + struct descriptor Gdtr; + + TXT_PROCESSOR_SMM_DESCRIPTOR * Psd; + + Psd = smbase + SMM_PSD_OFFSET - (apic_id * state_size); + + printk(BIOS_DEBUG, "Setting up Smm Descriptor - Smbase: %p Psd: %p\n", smbase, Psd); + + memset(Psd, 0, sizeof(TXT_PROCESSOR_SMM_DESCRIPTOR)); + + memcpy(&Psd->Signature, TXT_PROCESSOR_SMM_DESCRIPTOR_SIGNATURE, 8); + Psd->SmmDescriptorVerMajor = TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MAJOR; + Psd->SmmDescriptorVerMinor = TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MINOR; + Psd->SmmSmiHandlerRip = (uint64_t)((uint32_t)smbase + SMM_ENTRY_OFFSET + entry32_off); + Psd->LocalApicId = apic_id; + Psd->Size = sizeof(TXT_PROCESSOR_SMM_DESCRIPTOR); + Psd->AcpiRsdp = 0; + Psd->BiosHwResourceRequirementsPtr = (uint64_t)((uint32_t)GetStmResource()); + Psd->SmmCs = 0x8; + Psd->SmmDs = 0x10; + Psd->SmmSs = 0x10; + Psd->SmmOtherSegment = 0x10; + Psd->SmmTr = 0x18; + + ReadGdtr(&Gdtr); + + Psd->SmmGdtPtr = Gdtr.base; + Psd->SmmGdtSize = Gdtr.limit + 1; // the stm will subtract, so need to compensate +}
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm STM support ......................................................................
Patch Set 1:
(1387 comments)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h File src/security/intel/stm/SmmStm.h:
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@7 PS1, Line 7: accompanies this distribution. The full text of the license may trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@37 PS1, Line 37: void *StmImage, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@38 PS1, Line 38: uint32_t StmImageSize please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@39 PS1, Line 39: ); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@47 PS1, Line 47: If 0, list must be terminated by END_OF_RESOURCES. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@51 PS1, Line 51: @retval OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas. line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@55 PS1, Line 55: STM_RSC *ResourceList, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@56 PS1, Line 56: uint32_t NumEntries please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@57 PS1, Line 57: ); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@64 PS1, Line 64: NULL means delete all resources. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@66 PS1, Line 66: If 0, list must be terminated by END_OF_RESOURCES. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@73 PS1, Line 73: STM_RSC *ResourceList, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@74 PS1, Line 74: uint32_t NumEntries please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@75 PS1, Line 75: ); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@83 PS1, Line 83: On output it means size of resource list filled, code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@84 PS1, Line 84: or the size of resource list to be filled if trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@84 PS1, Line 84: or the size of resource list to be filled if code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@88 PS1, Line 88: @retval BUFFER_TOO_SMALL If resource list buffer is too small to trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@93 PS1, Line 93: STM_RSC *ResourceList, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@94 PS1, Line 94: uint32_t *ResourceSize please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@95 PS1, Line 95: ); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@105 PS1, Line 105: void *StmResource please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@106 PS1, Line 106: ); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@114 PS1, Line 114: void * function definition argument 'void' should also have an identifier name
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@116 PS1, Line 116: void please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.h@117 PS1, Line 117: ); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@39 PS1, Line 39: #define STM_SIZE_TO_PAGES(a) (((a) >> STM_PAGE_SHIFT) + (((a) & STM_PAGE_MASK) ? 1 : 0)) line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@54 PS1, Line 54: bool StmCheckStmImage(void * StmImage, uint32_t StmImageSize); "foo * bar" should be "foo *bar"
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@55 PS1, Line 55: void StmLoadStmImage(void * StmImage, UINTN StmImageSize); "foo * bar" should be "foo *bar"
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@140 PS1, Line 140: ) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@148 PS1, Line 148: ResourceHi = 0; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@148 PS1, Line 148: ResourceHi = 0; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@148 PS1, Line 148: ResourceHi = 0; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@149 PS1, Line 149: RecordLo = 0; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@149 PS1, Line 149: RecordLo = 0; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@149 PS1, Line 149: RecordLo = 0; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@150 PS1, Line 150: RecordHi = 0; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@150 PS1, Line 150: RecordHi = 0; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@150 PS1, Line 150: RecordHi = 0; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@158 PS1, Line 158: switch (Resource->Header.RscType) { switch and case should be at the same indent
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@165 PS1, Line 165: if (Resource->Mem.RWXAttributes != Record->Mem.RWXAttributes) { line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@166 PS1, Line 166: if ((ResourceLo == RecordLo) && (ResourceHi == RecordHi)) { line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@166 PS1, Line 166: if ((ResourceLo == RecordLo) && (ResourceHi == RecordHi)) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@166 PS1, Line 166: if ((ResourceLo == RecordLo) && (ResourceHi == RecordHi)) { please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@166 PS1, Line 166: if ((ResourceLo == RecordLo) && (ResourceHi == RecordHi)) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@167 PS1, Line 167: Record->Mem.RWXAttributes = Resource->Mem.RWXAttributes | Record->Mem.RWXAttributes; line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@167 PS1, Line 167: Record->Mem.RWXAttributes = Resource->Mem.RWXAttributes | Record->Mem.RWXAttributes; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@167 PS1, Line 167: Record->Mem.RWXAttributes = Resource->Mem.RWXAttributes | Record->Mem.RWXAttributes; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@167 PS1, Line 167: Record->Mem.RWXAttributes = Resource->Mem.RWXAttributes | Record->Mem.RWXAttributes; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@168 PS1, Line 168: return true; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@168 PS1, Line 168: return true; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@168 PS1, Line 168: return true; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@169 PS1, Line 169: } else { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@169 PS1, Line 169: } else { please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@169 PS1, Line 169: } else { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@170 PS1, Line 170: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@170 PS1, Line 170: return false; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@170 PS1, Line 170: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@171 PS1, Line 171: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@171 PS1, Line 171: } please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@171 PS1, Line 171: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@172 PS1, Line 172: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@172 PS1, Line 172: } please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@172 PS1, Line 172: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@173 PS1, Line 173: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@173 PS1, Line 173: break; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@173 PS1, Line 173: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@177 PS1, Line 177: ResourceHi = (uint64_t) Resource->Io.Base + (uint64_t) Resource->Io.Length; line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@177 PS1, Line 177: ResourceHi = (uint64_t) Resource->Io.Base + (uint64_t) Resource->Io.Length; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@177 PS1, Line 177: ResourceHi = (uint64_t) Resource->Io.Base + (uint64_t) Resource->Io.Length; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@177 PS1, Line 177: ResourceHi = (uint64_t) Resource->Io.Base + (uint64_t) Resource->Io.Length; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@179 PS1, Line 179: RecordHi = (uint64_t) Record->Io.Base + (uint64_t) Record->Io.Length; line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@179 PS1, Line 179: RecordHi = (uint64_t) Record->Io.Base + (uint64_t) Record->Io.Length; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@179 PS1, Line 179: RecordHi = (uint64_t) Record->Io.Base + (uint64_t) Record->Io.Length; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@179 PS1, Line 179: RecordHi = (uint64_t) Record->Io.Base + (uint64_t) Record->Io.Length; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@182 PS1, Line 182: if ((Resource->PciCfg.OriginatingBusNumber != Record->PciCfg.OriginatingBusNumber) || line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@183 PS1, Line 183: (Resource->PciCfg.LastNodeIndex != Record->PciCfg.LastNodeIndex)) { line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@185 PS1, Line 185: } trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@186 PS1, Line 186: if (memcmp (Resource->PciCfg.PciDevicePath, Record->PciCfg.PciDevicePath, sizeof(STM_PCI_DEVICE_PATH_NODE) * (Resource->PciCfg.LastNodeIndex + 1)) != 0) { line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@186 PS1, Line 186: if (memcmp (Resource->PciCfg.PciDevicePath, Record->PciCfg.PciDevicePath, sizeof(STM_PCI_DEVICE_PATH_NODE) * (Resource->PciCfg.LastNodeIndex + 1)) != 0) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@186 PS1, Line 186: if (memcmp (Resource->PciCfg.PciDevicePath, Record->PciCfg.PciDevicePath, sizeof(STM_PCI_DEVICE_PATH_NODE) * (Resource->PciCfg.LastNodeIndex + 1)) != 0) { please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@186 PS1, Line 186: if (memcmp (Resource->PciCfg.PciDevicePath, Record->PciCfg.PciDevicePath, sizeof(STM_PCI_DEVICE_PATH_NODE) * (Resource->PciCfg.LastNodeIndex + 1)) != 0) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@186 PS1, Line 186: if (memcmp (Resource->PciCfg.PciDevicePath, Record->PciCfg.PciDevicePath, sizeof(STM_PCI_DEVICE_PATH_NODE) * (Resource->PciCfg.LastNodeIndex + 1)) != 0) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@186 PS1, Line 186: if (memcmp (Resource->PciCfg.PciDevicePath, Record->PciCfg.PciDevicePath, sizeof(STM_PCI_DEVICE_PATH_NODE) * (Resource->PciCfg.LastNodeIndex + 1)) != 0) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@188 PS1, Line 188: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@188 PS1, Line 188: } please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@188 PS1, Line 188: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@190 PS1, Line 190: ResourceHi = (uint64_t) Resource->PciCfg.Base + (uint64_t) Resource->PciCfg.Length; line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@192 PS1, Line 192: RecordHi = (uint64_t) Record->PciCfg.Base + (uint64_t) Record->PciCfg.Length; line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@193 PS1, Line 193: if (Resource->PciCfg.RWAttributes != Record->PciCfg.RWAttributes) { line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@194 PS1, Line 194: if ((ResourceLo == RecordLo) && (ResourceHi == RecordHi)) { line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@195 PS1, Line 195: Record->PciCfg.RWAttributes = Resource->PciCfg.RWAttributes | Record->PciCfg.RWAttributes; line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@200 PS1, Line 200: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@200 PS1, Line 200: } please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@200 PS1, Line 200: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@201 PS1, Line 201: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@201 PS1, Line 201: break; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@201 PS1, Line 201: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@203 PS1, Line 203: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@203 PS1, Line 203: // please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@203 PS1, Line 203: // please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@204 PS1, Line 204: // Special case - merge MSR masks in place. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@204 PS1, Line 204: // Special case - merge MSR masks in place. please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@204 PS1, Line 204: // Special case - merge MSR masks in place. please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@205 PS1, Line 205: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@205 PS1, Line 205: // please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@205 PS1, Line 205: // please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@206 PS1, Line 206: if (Resource->Msr.MsrIndex != Record->Msr.MsrIndex) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@206 PS1, Line 206: if (Resource->Msr.MsrIndex != Record->Msr.MsrIndex) { please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@206 PS1, Line 206: if (Resource->Msr.MsrIndex != Record->Msr.MsrIndex) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@206 PS1, Line 206: if (Resource->Msr.MsrIndex != Record->Msr.MsrIndex) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@208 PS1, Line 208: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@208 PS1, Line 208: } please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@208 PS1, Line 208: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@209 PS1, Line 209: Record->Msr.ReadMask |= Resource->Msr.ReadMask; trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@209 PS1, Line 209: Record->Msr.ReadMask |= Resource->Msr.ReadMask; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@209 PS1, Line 209: Record->Msr.ReadMask |= Resource->Msr.ReadMask; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@209 PS1, Line 209: Record->Msr.ReadMask |= Resource->Msr.ReadMask; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@210 PS1, Line 210: Record->Msr.WriteMask |= Resource->Msr.WriteMask; trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@211 PS1, Line 211: return true; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@211 PS1, Line 211: return true; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@211 PS1, Line 211: return true; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@213 PS1, Line 213: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@213 PS1, Line 213: return false; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@213 PS1, Line 213: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@218 PS1, Line 218: if ((ResourceHi < RecordLo) || (ResourceLo > RecordHi)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@219 PS1, Line 219: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@219 PS1, Line 219: return false; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@219 PS1, Line 219: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@224 PS1, Line 224: // trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@225 PS1, Line 225: if ((ResourceLo >= RecordLo) && (ResourceHi <= RecordHi)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@226 PS1, Line 226: return true; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@226 PS1, Line 226: return true; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@226 PS1, Line 226: return true; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@227 PS1, Line 227: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@227 PS1, Line 227: } please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@227 PS1, Line 227: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@229 PS1, Line 229: // Resources are overlapping. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@229 PS1, Line 229: // Resources are overlapping. please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@229 PS1, Line 229: // Resources are overlapping. please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@230 PS1, Line 230: // Resource and record are merged. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@230 PS1, Line 230: // Resource and record are merged. please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@230 PS1, Line 230: // Resource and record are merged. please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@231 PS1, Line 231: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@231 PS1, Line 231: // please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@231 PS1, Line 231: // please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@232 PS1, Line 232: ResourceLo = (ResourceLo < RecordLo) ? ResourceLo : RecordLo; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@232 PS1, Line 232: ResourceLo = (ResourceLo < RecordLo) ? ResourceLo : RecordLo; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@232 PS1, Line 232: ResourceLo = (ResourceLo < RecordLo) ? ResourceLo : RecordLo; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@235 PS1, Line 235: switch (Resource->Header.RscType) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@235 PS1, Line 235: switch (Resource->Header.RscType) { please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@235 PS1, Line 235: switch (Resource->Header.RscType) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@235 PS1, Line 235: switch (Resource->Header.RscType) { switch and case should be at the same indent
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@240 PS1, Line 240: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@240 PS1, Line 240: break; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@240 PS1, Line 240: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@243 PS1, Line 243: Record->Io.Base = (uint64_t) ResourceLo; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@243 PS1, Line 243: Record->Io.Base = (uint64_t) ResourceLo; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@243 PS1, Line 243: Record->Io.Base = (uint64_t) ResourceLo; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@244 PS1, Line 244: Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@244 PS1, Line 244: Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo); code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@244 PS1, Line 244: Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo); please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@244 PS1, Line 244: Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@245 PS1, Line 245: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@245 PS1, Line 245: break; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@245 PS1, Line 245: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@248 PS1, Line 248: Record->PciCfg.Length = (uint64_t) (ResourceHi - ResourceLo); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@249 PS1, Line 249: break; trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@251 PS1, Line 251: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@251 PS1, Line 251: return false; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@251 PS1, Line 251: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@271 PS1, Line 271: if (Record->Header.RscType == END_OF_RESOURCES) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@278 PS1, Line 278: Record = (STM_RSC *)((void *)Record + Record->Header.Length); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@279 PS1, Line 279: continue; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@279 PS1, Line 279: continue; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@279 PS1, Line 279: continue; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@284 PS1, Line 284: if (HandleSingleResource (Resource, Record)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@284 PS1, Line 284: if (HandleSingleResource (Resource, Record)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@285 PS1, Line 285: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@286 PS1, Line 286: } trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@286 PS1, Line 286: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@286 PS1, Line 286: } please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@286 PS1, Line 286: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@293 PS1, Line 293: memcpy ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@297 PS1, Line 297: ); code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@297 PS1, Line 297: ); please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@297 PS1, Line 297: ); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@298 PS1, Line 298: memcpy ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@299 PS1, Line 299: mStmResourcesPtr + mStmResourceSizeUsed - sizeof(mRscEndNode) + Resource->Header.Length, line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@299 PS1, Line 299: mStmResourcesPtr + mStmResourceSizeUsed - sizeof(mRscEndNode) + Resource->Header.Length, code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@299 PS1, Line 299: mStmResourcesPtr + mStmResourceSizeUsed - sizeof(mRscEndNode) + Resource->Header.Length, please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@299 PS1, Line 299: mStmResourcesPtr + mStmResourceSizeUsed - sizeof(mRscEndNode) + Resource->Header.Length, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@300 PS1, Line 300: &mRscEndNode, code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@300 PS1, Line 300: &mRscEndNode, please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@300 PS1, Line 300: &mRscEndNode, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@302 PS1, Line 302: ); code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@302 PS1, Line 302: ); please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@302 PS1, Line 302: ); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@304 PS1, Line 304: mStmResourceSizeAvailable = mStmResourceTotalSize - mStmResourceSizeUsed; line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@306 PS1, Line 306: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@307 PS1, Line 307: } void function return statements are not generally useful
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@324 PS1, Line 324: if (NumEntries == 0) { braces {} are not necessary for any arm of this statement
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@331 PS1, Line 331: trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@331 PS1, Line 331: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@333 PS1, Line 333: if (Resource->Header.RscType == END_OF_RESOURCES) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@333 PS1, Line 333: if (Resource->Header.RscType == END_OF_RESOURCES) { please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@333 PS1, Line 333: if (Resource->Header.RscType == END_OF_RESOURCES) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@333 PS1, Line 333: if (Resource->Header.RscType == END_OF_RESOURCES) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@334 PS1, Line 334: return ; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@334 PS1, Line 334: return ; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@334 PS1, Line 334: return ; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@334 PS1, Line 334: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@336 PS1, Line 336: AddSingleResource (Resource); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@337 PS1, Line 337: Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@339 PS1, Line 339: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@340 PS1, Line 340: } void function return statements are not generally useful
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@348 PS1, Line 348: If 0, list must be terminated by END_OF_RESOURCES. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@355 PS1, Line 355: ValidateResource ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@356 PS1, Line 356: STM_RSC *ResourceList, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@357 PS1, Line 357: uint32_t NumEntries please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@358 PS1, Line 358: ) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@360 PS1, Line 360: uint32_t Count; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@361 PS1, Line 361: UINTN Index; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@362 PS1, Line 362: STM_RSC *Resource; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@363 PS1, Line 363: UINTN SubIndex; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@367 PS1, Line 367: // END_OF_RESOURCES. trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@368 PS1, Line 368: // trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@369 PS1, Line 369: if (NumEntries == 0) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@369 PS1, Line 369: if (NumEntries == 0) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@369 PS1, Line 369: if (NumEntries == 0) { braces {} are not necessary for any arm of this statement
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@370 PS1, Line 370: Count = 0xFFFFFFFF; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@371 PS1, Line 371: } else { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@371 PS1, Line 371: } else { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@372 PS1, Line 372: Count = NumEntries; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@373 PS1, Line 373: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@377 PS1, Line 377: // trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@378 PS1, Line 378: Resource = ResourceList; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@379 PS1, Line 379: trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@379 PS1, Line 379: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@380 PS1, Line 380: for (Index = 0; Index < Count; Index++) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@380 PS1, Line 380: for (Index = 0; Index < Count; Index++) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@381 PS1, Line 381: printk(BIOS_DEBUG, "ValidateResource (%llu) - RscType(%x)\n", Index, Resource->Header.RscType); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@381 PS1, Line 381: printk(BIOS_DEBUG, "ValidateResource (%llu) - RscType(%x)\n", Index, Resource->Header.RscType); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@381 PS1, Line 381: printk(BIOS_DEBUG, "ValidateResource (%llu) - RscType(%x)\n", Index, Resource->Header.RscType); Prefer using '"%s...", __func__' to using 'ValidateResource', this function's name, in a string
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@383 PS1, Line 383: // Validate resource. trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@384 PS1, Line 384: // trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@385 PS1, Line 385: switch (Resource->Header.RscType) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@385 PS1, Line 385: switch (Resource->Header.RscType) { switch and case should be at the same indent
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@386 PS1, Line 386: case END_OF_RESOURCES: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@387 PS1, Line 387: if (Resource->Header.Length != sizeof (STM_RSC_END)) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@387 PS1, Line 387: if (Resource->Header.Length != sizeof (STM_RSC_END)) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@387 PS1, Line 387: if (Resource->Header.Length != sizeof (STM_RSC_END)) { suspect code indent for conditional statements (8, 10)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@387 PS1, Line 387: if (Resource->Header.Length != sizeof (STM_RSC_END)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@387 PS1, Line 387: if (Resource->Header.Length != sizeof (STM_RSC_END)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@388 PS1, Line 388: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@388 PS1, Line 388: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@389 PS1, Line 389: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@389 PS1, Line 389: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@390 PS1, Line 390: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@391 PS1, Line 391: // If we are passed actual number of resources to add, code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@392 PS1, Line 392: // END_OF_RESOURCES structure between them is considered an code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@393 PS1, Line 393: // error. If NumEntries == 0 END_OF_RESOURCES is a termination. trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@393 PS1, Line 393: // error. If NumEntries == 0 END_OF_RESOURCES is a termination. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@394 PS1, Line 394: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@395 PS1, Line 395: if (NumEntries != 0) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@395 PS1, Line 395: if (NumEntries != 0) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@395 PS1, Line 395: if (NumEntries != 0) { suspect code indent for conditional statements (8, 10)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@396 PS1, Line 396: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@396 PS1, Line 396: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@397 PS1, Line 397: } else { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@397 PS1, Line 397: } else { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@397 PS1, Line 397: } else { suspect code indent for conditional statements (8, 10)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@398 PS1, Line 398: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@399 PS1, Line 399: // If NumEntries == 0 and list reached end - return success. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@400 PS1, Line 400: // trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@400 PS1, Line 400: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@401 PS1, Line 401: return true; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@401 PS1, Line 401: return true; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@402 PS1, Line 402: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@402 PS1, Line 402: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@403 PS1, Line 403: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@403 PS1, Line 403: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@405 PS1, Line 405: case MEM_RANGE: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@406 PS1, Line 406: case MMIO_RANGE: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@407 PS1, Line 407: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@407 PS1, Line 407: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@407 PS1, Line 407: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) { suspect code indent for conditional statements (8, 10)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@407 PS1, Line 407: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@407 PS1, Line 407: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@408 PS1, Line 408: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@408 PS1, Line 408: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@409 PS1, Line 409: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@409 PS1, Line 409: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@411 PS1, Line 411: if (Resource->Mem.RWXAttributes > FULL_ACCS) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@411 PS1, Line 411: if (Resource->Mem.RWXAttributes > FULL_ACCS) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@411 PS1, Line 411: if (Resource->Mem.RWXAttributes > FULL_ACCS) { suspect code indent for conditional statements (8, 10)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@411 PS1, Line 411: if (Resource->Mem.RWXAttributes > FULL_ACCS) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@412 PS1, Line 412: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@412 PS1, Line 412: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@413 PS1, Line 413: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@413 PS1, Line 413: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@414 PS1, Line 414: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@414 PS1, Line 414: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@415 PS1, Line 415: trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@415 PS1, Line 415: code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@415 PS1, Line 415: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@416 PS1, Line 416: case IO_RANGE: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@417 PS1, Line 417: case TRAPPED_IO_RANGE: trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@417 PS1, Line 417: case TRAPPED_IO_RANGE: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@418 PS1, Line 418: if (Resource->Header.Length != sizeof (STM_RSC_IO_DESC)) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@418 PS1, Line 418: if (Resource->Header.Length != sizeof (STM_RSC_IO_DESC)) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@418 PS1, Line 418: if (Resource->Header.Length != sizeof (STM_RSC_IO_DESC)) { suspect code indent for conditional statements (8, 10)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@418 PS1, Line 418: if (Resource->Header.Length != sizeof (STM_RSC_IO_DESC)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@418 PS1, Line 418: if (Resource->Header.Length != sizeof (STM_RSC_IO_DESC)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@419 PS1, Line 419: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@419 PS1, Line 419: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@420 PS1, Line 420: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@420 PS1, Line 420: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@422 PS1, Line 422: if ((Resource->Io.Base + Resource->Io.Length) > 0xFFFF) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@422 PS1, Line 422: if ((Resource->Io.Base + Resource->Io.Length) > 0xFFFF) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@422 PS1, Line 422: if ((Resource->Io.Base + Resource->Io.Length) > 0xFFFF) { suspect code indent for conditional statements (8, 10)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@422 PS1, Line 422: if ((Resource->Io.Base + Resource->Io.Length) > 0xFFFF) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@423 PS1, Line 423: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@423 PS1, Line 423: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@424 PS1, Line 424: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@424 PS1, Line 424: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@425 PS1, Line 425: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@425 PS1, Line 425: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@427 PS1, Line 427: case PCI_CFG_RANGE: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@428 PS1, Line 428: printk(BIOS_DEBUG, "ValidateResource - PCI (0x%02x, 0x%08x, 0x%02x, 0x%02x)\n", Resource->PciCfg.OriginatingBusNumber, Resource->PciCfg.LastNodeIndex, Resource->PciCfg.PciDevicePath[0].PciDevice, Resource->PciCfg.PciDevicePath[0].PciFunction); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@428 PS1, Line 428: printk(BIOS_DEBUG, "ValidateResource - PCI (0x%02x, 0x%08x, 0x%02x, 0x%02x)\n", Resource->PciCfg.OriginatingBusNumber, Resource->PciCfg.LastNodeIndex, Resource->PciCfg.PciDevicePath[0].PciDevice, Resource->PciCfg.PciDevicePath[0].PciFunction); code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@428 PS1, Line 428: printk(BIOS_DEBUG, "ValidateResource - PCI (0x%02x, 0x%08x, 0x%02x, 0x%02x)\n", Resource->PciCfg.OriginatingBusNumber, Resource->PciCfg.LastNodeIndex, Resource->PciCfg.PciDevicePath[0].PciDevice, Resource->PciCfg.PciDevicePath[0].PciFunction); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@428 PS1, Line 428: printk(BIOS_DEBUG, "ValidateResource - PCI (0x%02x, 0x%08x, 0x%02x, 0x%02x)\n", Resource->PciCfg.OriginatingBusNumber, Resource->PciCfg.LastNodeIndex, Resource->PciCfg.PciDevicePath[0].PciDevice, Resource->PciCfg.PciDevicePath[0].PciFunction); Prefer using '"%s...", __func__' to using 'ValidateResource', this function's name, in a string
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@429 PS1, Line 429: if (Resource->Header.Length != sizeof (STM_RSC_PCI_CFG_DESC) + (sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex)) { line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@429 PS1, Line 429: if (Resource->Header.Length != sizeof (STM_RSC_PCI_CFG_DESC) + (sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex)) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@429 PS1, Line 429: if (Resource->Header.Length != sizeof (STM_RSC_PCI_CFG_DESC) + (sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex)) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@429 PS1, Line 429: if (Resource->Header.Length != sizeof (STM_RSC_PCI_CFG_DESC) + (sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex)) { suspect code indent for conditional statements (8, 10)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@429 PS1, Line 429: if (Resource->Header.Length != sizeof (STM_RSC_PCI_CFG_DESC) + (sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@429 PS1, Line 429: if (Resource->Header.Length != sizeof (STM_RSC_PCI_CFG_DESC) + (sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@430 PS1, Line 430: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@430 PS1, Line 430: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@431 PS1, Line 431: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@431 PS1, Line 431: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@432 PS1, Line 432: for (SubIndex = 0; SubIndex <= Resource->PciCfg.LastNodeIndex; SubIndex++) { line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@432 PS1, Line 432: for (SubIndex = 0; SubIndex <= Resource->PciCfg.LastNodeIndex; SubIndex++) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@432 PS1, Line 432: for (SubIndex = 0; SubIndex <= Resource->PciCfg.LastNodeIndex; SubIndex++) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@432 PS1, Line 432: for (SubIndex = 0; SubIndex <= Resource->PciCfg.LastNodeIndex; SubIndex++) { suspect code indent for conditional statements (8, 10)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@433 PS1, Line 433: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) { line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@433 PS1, Line 433: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@433 PS1, Line 433: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@433 PS1, Line 433: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) { suspect code indent for conditional statements (10, 12)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@433 PS1, Line 433: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@434 PS1, Line 434: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@434 PS1, Line 434: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@435 PS1, Line 435: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@435 PS1, Line 435: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@436 PS1, Line 436: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@436 PS1, Line 436: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@437 PS1, Line 437: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@437 PS1, Line 437: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@437 PS1, Line 437: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { suspect code indent for conditional statements (8, 10)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@437 PS1, Line 437: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@438 PS1, Line 438: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@438 PS1, Line 438: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@439 PS1, Line 439: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@439 PS1, Line 439: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@440 PS1, Line 440: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@440 PS1, Line 440: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@442 PS1, Line 442: case MACHINE_SPECIFIC_REG: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@443 PS1, Line 443: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@443 PS1, Line 443: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@443 PS1, Line 443: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) { suspect code indent for conditional statements (8, 10)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@443 PS1, Line 443: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@443 PS1, Line 443: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@444 PS1, Line 444: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@444 PS1, Line 444: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@445 PS1, Line 445: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@445 PS1, Line 445: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@446 PS1, Line 446: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@446 PS1, Line 446: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@447 PS1, Line 447: trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@447 PS1, Line 447: code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@447 PS1, Line 447: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@448 PS1, Line 448: default : trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@448 PS1, Line 448: default : please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@448 PS1, Line 448: default : space prohibited before that ':' (ctx:WxW)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@449 PS1, Line 449: printk(BIOS_DEBUG, "ValidateResource - Unknown RscType(%x)\n", Resource->Header.RscType); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@449 PS1, Line 449: printk(BIOS_DEBUG, "ValidateResource - Unknown RscType(%x)\n", Resource->Header.RscType); code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@449 PS1, Line 449: printk(BIOS_DEBUG, "ValidateResource - Unknown RscType(%x)\n", Resource->Header.RscType); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@449 PS1, Line 449: printk(BIOS_DEBUG, "ValidateResource - Unknown RscType(%x)\n", Resource->Header.RscType); Prefer using '"%s...", __func__' to using 'ValidateResource', this function's name, in a string
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@450 PS1, Line 450: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@450 PS1, Line 450: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@451 PS1, Line 451: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@452 PS1, Line 452: Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@453 PS1, Line 453: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@454 PS1, Line 454: return true; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@464 PS1, Line 464: If 0, list must be terminated by END_OF_RESOURCES. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@471 PS1, Line 471: GetResourceSize ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@472 PS1, Line 472: STM_RSC *ResourceList, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@473 PS1, Line 473: uint32_t NumEntries please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@474 PS1, Line 474: ) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@476 PS1, Line 476: uint32_t Count; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@477 PS1, Line 477: UINTN Index; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@478 PS1, Line 478: STM_RSC *Resource; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@480 PS1, Line 480: Resource = ResourceList; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@484 PS1, Line 484: // END_OF_RESOURCES. trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@485 PS1, Line 485: // trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@486 PS1, Line 486: if (NumEntries == 0) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@486 PS1, Line 486: if (NumEntries == 0) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@486 PS1, Line 486: if (NumEntries == 0) { braces {} are not necessary for any arm of this statement
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@487 PS1, Line 487: Count = 0xFFFFFFFF; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@488 PS1, Line 488: } else { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@488 PS1, Line 488: } else { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@489 PS1, Line 489: Count = NumEntries; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@490 PS1, Line 490: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@494 PS1, Line 494: // trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@495 PS1, Line 495: Resource = ResourceList; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@496 PS1, Line 496: trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@496 PS1, Line 496: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@497 PS1, Line 497: for (Index = 0; Index < Count; Index++) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@497 PS1, Line 497: for (Index = 0; Index < Count; Index++) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@498 PS1, Line 498: if (Resource->Header.RscType == END_OF_RESOURCES) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@498 PS1, Line 498: if (Resource->Header.RscType == END_OF_RESOURCES) { suspect code indent for conditional statements (4, 6)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@498 PS1, Line 498: if (Resource->Header.RscType == END_OF_RESOURCES) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@499 PS1, Line 499: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@500 PS1, Line 500: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@501 PS1, Line 501: Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@502 PS1, Line 502: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@503 PS1, Line 503: return (UINTN)((uint32_t)Resource - (uint32_t) ResourceList); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@512 PS1, Line 512: If 0, list must be terminated by END_OF_RESOURCES. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@516 PS1, Line 516: @retval EFI_OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas. line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@520 PS1, Line 520: AddPiResource ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@521 PS1, Line 521: STM_RSC *ResourceList, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@522 PS1, Line 522: uint32_t NumEntries please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@523 PS1, Line 523: ) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@526 PS1, Line 526: UINTN ResourceSize; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@530 PS1, Line 530: printk (BIOS_DEBUG, "AddPiResource - Enter\n"); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@530 PS1, Line 530: printk (BIOS_DEBUG, "AddPiResource - Enter\n"); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@530 PS1, Line 530: printk (BIOS_DEBUG, "AddPiResource - Enter\n"); Prefer using '"%s...", __func__' to using 'AddPiResource', this function's name, in a string
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@532 PS1, Line 532: if (!ValidateResource (ResourceList, NumEntries)) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@532 PS1, Line 532: if (!ValidateResource (ResourceList, NumEntries)) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@532 PS1, Line 532: if (!ValidateResource (ResourceList, NumEntries)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@532 PS1, Line 532: if (!ValidateResource (ResourceList, NumEntries)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@533 PS1, Line 533: return -1; //EFI_INVALID_PARAMETER; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@534 PS1, Line 534: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@536 PS1, Line 536: ResourceSize = GetResourceSize (ResourceList, NumEntries); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@536 PS1, Line 536: ResourceSize = GetResourceSize (ResourceList, NumEntries); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@537 PS1, Line 537: printk (BIOS_DEBUG, "ResourceSize - 0x%08llx\n", ResourceSize); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@537 PS1, Line 537: printk (BIOS_DEBUG, "ResourceSize - 0x%08llx\n", ResourceSize); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@538 PS1, Line 538: if (ResourceSize == 0) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@538 PS1, Line 538: if (ResourceSize == 0) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@538 PS1, Line 538: if (ResourceSize == 0) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@539 PS1, Line 539: return -1;//EFI_INVALID_PARAMETER; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@540 PS1, Line 540: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@542 PS1, Line 542: if (mStmResourcesPtr == NULL) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@542 PS1, Line 542: if (mStmResourcesPtr == NULL) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@544 PS1, Line 544: // Copy EndResource for intialization 'intialization' may be misspelled - perhaps 'initialization'?
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@549 PS1, Line 549: mStmResourcesPtr = StmResourceHeap; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@550 PS1, Line 550: mStmResourceTotalSize = RESOURCEHEAPSIZE; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@551 PS1, Line 551: memset(mStmResourcesPtr, 0, RESOURCEHEAPSIZE); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@553 PS1, Line 553: memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode)); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@553 PS1, Line 553: memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode)); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@554 PS1, Line 554: mStmResourceSizeUsed = sizeof(mRscEndNode); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@555 PS1, Line 555: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@561 PS1, Line 561: } else if (mStmResourceSizeAvailable < ResourceSize) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@567 PS1, Line 567: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@572 PS1, Line 572: AddResource (ResourceList, NumEntries); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@572 PS1, Line 572: AddResource (ResourceList, NumEntries); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@574 PS1, Line 574: return 0;//EFI_SUCCESS; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@582 PS1, Line 582: NULL means delete all resources. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@584 PS1, Line 584: If 0, list must be terminated by END_OF_RESOURCES. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@591 PS1, Line 591: DeletePiResource ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@592 PS1, Line 592: STM_RSC *ResourceList, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@593 PS1, Line 593: uint32_t NumEntries please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@594 PS1, Line 594: ) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@596 PS1, Line 596: if (ResourceList != NULL) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@596 PS1, Line 596: if (ResourceList != NULL) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@599 PS1, Line 599: return -1;//EFI_UNSUPPORTED; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@600 PS1, Line 600: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@604 PS1, Line 604: memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode)); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@604 PS1, Line 604: memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode)); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@605 PS1, Line 605: mStmResourceSizeUsed = sizeof(mRscEndNode); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@606 PS1, Line 606: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@607 PS1, Line 607: return 0;//EFI_SUCCESS; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@616 PS1, Line 616: On output it means size of resource list filled, code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@617 PS1, Line 617: or the size of resource list to be filled if size of too small. line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@617 PS1, Line 617: or the size of resource list to be filled if size of too small. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@620 PS1, Line 620: @retval EFI_BUFFER_TOO_SMALL If resource list buffer is too small to hold the whole resources. line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@624 PS1, Line 624: GetPiResource ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@625 PS1, Line 625: STM_RSC *ResourceList, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@626 PS1, Line 626: uint32_t *ResourceSize please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@627 PS1, Line 627: ) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@629 PS1, Line 629: if (*ResourceSize < mStmResourceSizeUsed) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@629 PS1, Line 629: if (*ResourceSize < mStmResourceSizeUsed) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@630 PS1, Line 630: *ResourceSize = (uint32_t)mStmResourceSizeUsed; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@631 PS1, Line 631: return -1;//EFI_BUFFER_TOO_SMALL; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@632 PS1, Line 632: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@634 PS1, Line 634: memcpy (ResourceList, mStmResourcesPtr, mStmResourceSizeUsed); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@634 PS1, Line 634: memcpy (ResourceList, mStmResourcesPtr, mStmResourceSizeUsed); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@635 PS1, Line 635: *ResourceSize = (uint32_t)mStmResourceSizeUsed; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@636 PS1, Line 636: return 0;//EFI_SUCCESS; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@645 PS1, Line 645: GetVmcsSize ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@646 PS1, Line 646: void please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@647 PS1, Line 647: ) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@649 PS1, Line 649: uint32_t ThisVmcsSize; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@650 PS1, Line 650: VMX_BASIC_MSR MsrData64; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@651 PS1, Line 651: int StmSupport; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@653 PS1, Line 653: MsrData64.msr = rdmsr (IA32_VMX_BASIC_MSR_INDEX); trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@653 PS1, Line 653: MsrData64.msr = rdmsr (IA32_VMX_BASIC_MSR_INDEX); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@653 PS1, Line 653: MsrData64.msr = rdmsr (IA32_VMX_BASIC_MSR_INDEX); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@655 PS1, Line 655: ThisVmcsSize = MsrData64.bits.VmcsSize; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@656 PS1, Line 656: StmSupport = MsrData64.bits.StmSupported; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@657 PS1, Line 657: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@657 PS1, Line 657: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@657 PS1, Line 657: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport); Prefer using '"%s...", __func__' to using 'GetVmcsSize', this function's name, in a string
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@662 PS1, Line 662: ThisVmcsSize = STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (ThisVmcsSize)); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@662 PS1, Line 662: ThisVmcsSize = STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (ThisVmcsSize)); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@662 PS1, Line 662: ThisVmcsSize = STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (ThisVmcsSize)); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@664 PS1, Line 664: return ThisVmcsSize; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@676 PS1, Line 676: StmGen4GPageTableIa32 ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@677 PS1, Line 677: uint32_t PageTableBase please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@678 PS1, Line 678: ) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@680 PS1, Line 680: UINTN Index; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@681 PS1, Line 681: uint32_t *Pte; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@682 PS1, Line 682: uint32_t Address; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@684 PS1, Line 684: Pte = (uint32_t*)(uint32_t)PageTableBase; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@684 PS1, Line 684: Pte = (uint32_t*)(uint32_t)PageTableBase; "(foo*)" should be "(foo *)"
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@686 PS1, Line 686: Address = 0; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@687 PS1, Line 687: for (Index = 0; Index < SIZE_4KB / sizeof (*Pte); Index++) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@687 PS1, Line 687: for (Index = 0; Index < SIZE_4KB / sizeof (*Pte); Index++) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@687 PS1, Line 687: for (Index = 0; Index < SIZE_4KB / sizeof (*Pte); Index++) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@688 PS1, Line 688: *Pte = Address | IA32_PG_PS | IA32_PG_RW | IA32_PG_P; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@689 PS1, Line 689: Pte++; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@690 PS1, Line 690: Address += SIZE_4MB; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@691 PS1, Line 691: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@693 PS1, Line 693: return ; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@693 PS1, Line 693: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@705 PS1, Line 705: StmGen4GPageTableX64 ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@706 PS1, Line 706: uint32_t PageTableBase please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@707 PS1, Line 707: ) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@709 PS1, Line 709: UINTN Index; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@710 PS1, Line 710: UINTN SubIndex; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@711 PS1, Line 711: uint64_t *Pde; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@712 PS1, Line 712: uint64_t *Pte; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@713 PS1, Line 713: uint64_t *Pml4; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@715 PS1, Line 715: Pml4 = (uint64_t*)(uint32_t) PageTableBase; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@715 PS1, Line 715: Pml4 = (uint64_t*)(uint32_t) PageTableBase; "(foo*)" should be "(foo *)"
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@716 PS1, Line 716: PageTableBase += SIZE_4KB; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@717 PS1, Line 717: *Pml4 = PageTableBase | IA32_PG_RW | IA32_PG_P; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@719 PS1, Line 719: Pde = (uint64_t*)(uint32_t)PageTableBase; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@719 PS1, Line 719: Pde = (uint64_t*)(uint32_t)PageTableBase; "(foo*)" should be "(foo *)"
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@720 PS1, Line 720: PageTableBase += SIZE_4KB; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@721 PS1, Line 721: Pte = (uint64_t *)(uint32_t)PageTableBase; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@723 PS1, Line 723: for (Index = 0; Index < 4; Index++) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@723 PS1, Line 723: for (Index = 0; Index < 4; Index++) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@724 PS1, Line 724: *Pde = PageTableBase | IA32_PG_RW | IA32_PG_P; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@725 PS1, Line 725: Pde++; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@726 PS1, Line 726: PageTableBase += SIZE_4KB; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@728 PS1, Line 728: for (SubIndex = 0; SubIndex < SIZE_4KB / sizeof (*Pte); SubIndex++) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@728 PS1, Line 728: for (SubIndex = 0; SubIndex < SIZE_4KB / sizeof (*Pte); SubIndex++) { suspect code indent for conditional statements (4, 6)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@728 PS1, Line 728: for (SubIndex = 0; SubIndex < SIZE_4KB / sizeof (*Pte); SubIndex++) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@729 PS1, Line 729: *Pte = (((Index << 9) + SubIndex) << 21) | IA32_PG_PS | IA32_PG_RW | IA32_PG_P; line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@729 PS1, Line 729: *Pte = (((Index << 9) + SubIndex) << 21) | IA32_PG_PS | IA32_PG_RW | IA32_PG_P; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@730 PS1, Line 730: Pte++; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@731 PS1, Line 731: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@732 PS1, Line 732: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@734 PS1, Line 734: return ; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@734 PS1, Line 734: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@748 PS1, Line 748: bool StmCheckStmImage ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@749 PS1, Line 749: void * StmImage, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@749 PS1, Line 749: void * StmImage, "foo * bar" should be "foo *bar"
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@750 PS1, Line 750: uint32_t StmImageSize please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@751 PS1, Line 751: ) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@753 PS1, Line 753: UINTN MinMsegSize; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@754 PS1, Line 754: STM_HEADER *StmHeader; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@756 PS1, Line 756: StmHeader = (STM_HEADER *)StmImage; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@761 PS1, Line 761: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) + line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@761 PS1, Line 761: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) + please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@761 PS1, Line 761: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) + space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@761 PS1, Line 761: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) + space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@762 PS1, Line 762: StmHeader->SwStmHdr.AdditionalDynamicMemorySize + code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@762 PS1, Line 762: StmHeader->SwStmHdr.AdditionalDynamicMemorySize + please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@763 PS1, Line 763: (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@763 PS1, Line 763: (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count); code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@763 PS1, Line 763: (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@763 PS1, Line 763: (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@764 PS1, Line 764: if (MinMsegSize < StmImageSize) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@764 PS1, Line 764: if (MinMsegSize < StmImageSize) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@764 PS1, Line 764: if (MinMsegSize < StmImageSize) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@765 PS1, Line 765: MinMsegSize = StmImageSize; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@766 PS1, Line 766: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@768 PS1, Line 768: if (StmHeader->HwStmHdr.Cr3Offset >= StmHeader->SwStmHdr.StaticImageSize) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@768 PS1, Line 768: if (StmHeader->HwStmHdr.Cr3Offset >= StmHeader->SwStmHdr.StaticImageSize) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@772 PS1, Line 772: if (MinMsegSize < StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6)) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@772 PS1, Line 772: if (MinMsegSize < StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6)) { suspect code indent for conditional statements (4, 6)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@772 PS1, Line 772: if (MinMsegSize < StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@773 PS1, Line 773: MinMsegSize = StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@774 PS1, Line 774: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@775 PS1, Line 775: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@780 PS1, Line 780: if (MinMsegSize > CONFIG_MSEG_SIZE) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@780 PS1, Line 780: if (MinMsegSize > CONFIG_MSEG_SIZE) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@780 PS1, Line 780: if (MinMsegSize > CONFIG_MSEG_SIZE) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@781 PS1, Line 781: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@782 PS1, Line 782: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@784 PS1, Line 784: return true; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@798 PS1, Line 798: StmLoadStmImage ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@799 PS1, Line 799: void * StmImage, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@799 PS1, Line 799: void * StmImage, "foo * bar" should be "foo *bar"
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@800 PS1, Line 800: UINTN StmImageSize please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@801 PS1, Line 801: ) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@803 PS1, Line 803: uint32_t MsegBase; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@804 PS1, Line 804: STM_HEADER *StmHeader; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@805 PS1, Line 805: SMM_MONITOR_CTL_MSR SmmMonitorMsr; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@807 PS1, Line 807: StmHeader = (STM_HEADER *)(uint32_t)StmImage; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@808 PS1, Line 808: SmmMonitorMsr.msr = rdmsr(IA32_SMM_MONITOR_CTL_MSR_INDEX); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@809 PS1, Line 809: MsegBase = SmmMonitorMsr.bits.MsegAddress << 12; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@813 PS1, Line 813: memset((void *) MsegBase, 0, CONFIG_MSEG_SIZE); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@814 PS1, Line 814: //memcpy ((void *)(uint32_t)MsegBase, (void *)(uint32_t)StmImage, StmImageSize); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@815 PS1, Line 815: memcpy((void *) MsegBase, (void *) StmImage, (size_t) StmImageSize); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@818 PS1, Line 818: if (sizeof(UINTN) == sizeof(uint64_t)) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@818 PS1, Line 818: if (sizeof(UINTN) == sizeof(uint64_t)) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@818 PS1, Line 818: if (sizeof(UINTN) == sizeof(uint64_t)) { braces {} are not necessary for any arm of this statement
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@819 PS1, Line 819: StmGen4GPageTableX64 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@819 PS1, Line 819: StmGen4GPageTableX64 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@820 PS1, Line 820: } else { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@820 PS1, Line 820: } else { suspect code indent for conditional statements (1, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@821 PS1, Line 821: StmGen4GPageTableIa32 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@821 PS1, Line 821: StmGen4GPageTableIa32 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@822 PS1, Line 822: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@837 PS1, Line 837: @retval EFI_BUFFER_TOO_SMALL MSEG is smaller than minimal requirement of STM image line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@841 PS1, Line 841: int LoadMonitor ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@842 PS1, Line 842: void * StmImage, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@842 PS1, Line 842: void * StmImage, "foo * bar" should be "foo *bar"
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@843 PS1, Line 843: uint32_t StmImageSize please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@844 PS1, Line 844: ) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@846 PS1, Line 846: SMM_MONITOR_CTL_MSR SmmMonCtlMsr; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@848 PS1, Line 848: SmmMonCtlMsr.msr = (msr_t) rdmsr(IA32_SMM_MONITOR_CTL_MSR_INDEX); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@850 PS1, Line 850: if (SmmMonCtlMsr.bits.MsegAddress == 0) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@850 PS1, Line 850: if (SmmMonCtlMsr.bits.MsegAddress == 0) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@850 PS1, Line 850: if (SmmMonCtlMsr.bits.MsegAddress == 0) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@851 PS1, Line 851: return STM_UNSUPPORTED; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@852 PS1, Line 852: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@853 PS1, Line 853: if (SmmMonCtlMsr.bits.valid != 0) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@853 PS1, Line 853: if (SmmMonCtlMsr.bits.valid != 0) { suspect code indent for conditional statements (2, 2)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@856 PS1, Line 856: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@858 PS1, Line 858: if (!StmCheckStmImage (StmImage, StmImageSize)) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@858 PS1, Line 858: if (!StmCheckStmImage (StmImage, StmImageSize)) { suspect code indent for conditional statements (2, 4)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@858 PS1, Line 858: if (!StmCheckStmImage (StmImage, StmImageSize)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@858 PS1, Line 858: if (!StmCheckStmImage (StmImage, StmImageSize)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@859 PS1, Line 859: return STM_BUFFER_TOO_SMALL; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@860 PS1, Line 860: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@863 PS1, Line 863: // Record STM_HASH to PCR 0, just in case it is NOT TXT launch, we still need provide the evidence. line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@864 PS1, Line 864: TpmMeasureAndLogData( please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@865 PS1, Line 865: 0, // PcrIndex please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@866 PS1, Line 866: TXT_EVTYPE_STM_HASH, // EventType please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@867 PS1, Line 867: NULL, // EventLog please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@868 PS1, Line 868: 0, // LogLen please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@869 PS1, Line 869: (void *)StmImage, // HashData please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@870 PS1, Line 870: StmImageSize // HashDataLen please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@871 PS1, Line 871: ); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@873 PS1, Line 873: StmLoadStmImage (StmImage, StmImageSize); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@873 PS1, Line 873: StmLoadStmImage (StmImage, StmImageSize); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@874 PS1, Line 874: trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@874 PS1, Line 874: code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@874 PS1, Line 874: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@875 PS1, Line 875: mStmState |= STM_SM_MONITOR_STATE_ENABLED; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@877 PS1, Line 877: return STM_SUCCESS; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@889 PS1, Line 889: void please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@890 PS1, Line 890: ) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/SmmStm.c@892 PS1, Line 892: return mStmResourcesPtr; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h File src/security/intel/stm/StmApi.h:
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@7 PS1, Line 7: distribution. The full text of the license may be found at trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@27 PS1, Line 27: #pragma pack (push, 1) space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@31 PS1, Line 31: uint32_t StmHeaderRevision; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@31 PS1, Line 31: uint32_t StmHeaderRevision; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@31 PS1, Line 31: uint32_t StmHeaderRevision; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@32 PS1, Line 32: uint32_t MonitorFeatures; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@32 PS1, Line 32: uint32_t MonitorFeatures; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@32 PS1, Line 32: uint32_t MonitorFeatures; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@33 PS1, Line 33: uint32_t GdtrLimit; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@33 PS1, Line 33: uint32_t GdtrLimit; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@33 PS1, Line 33: uint32_t GdtrLimit; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@34 PS1, Line 34: uint32_t GdtrBaseOffset; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@34 PS1, Line 34: uint32_t GdtrBaseOffset; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@34 PS1, Line 34: uint32_t GdtrBaseOffset; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@35 PS1, Line 35: uint32_t CsSelector; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@35 PS1, Line 35: uint32_t CsSelector; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@35 PS1, Line 35: uint32_t CsSelector; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@36 PS1, Line 36: uint32_t EipOffset; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@36 PS1, Line 36: uint32_t EipOffset; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@36 PS1, Line 36: uint32_t EipOffset; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@37 PS1, Line 37: uint32_t EspOffset; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@37 PS1, Line 37: uint32_t EspOffset; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@37 PS1, Line 37: uint32_t EspOffset; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@38 PS1, Line 38: uint32_t Cr3Offset; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@38 PS1, Line 38: uint32_t Cr3Offset; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@38 PS1, Line 38: uint32_t Cr3Offset; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@39 PS1, Line 39: uint8_t Reserved[STM_HARDWARE_FIELD_FILL_TO_2K]; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@39 PS1, Line 39: uint8_t Reserved[STM_HARDWARE_FIELD_FILL_TO_2K]; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@39 PS1, Line 39: uint8_t Reserved[STM_HARDWARE_FIELD_FILL_TO_2K]; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@45 PS1, Line 45: uint32_t Intel64ModeSupported :1; // bitfield code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@45 PS1, Line 45: uint32_t Intel64ModeSupported :1; // bitfield please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@45 PS1, Line 45: uint32_t Intel64ModeSupported :1; // bitfield please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@46 PS1, Line 46: uint32_t EptSupported :1; // bitfield code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@46 PS1, Line 46: uint32_t EptSupported :1; // bitfield please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@46 PS1, Line 46: uint32_t EptSupported :1; // bitfield please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@47 PS1, Line 47: uint32_t Reserved :30; // must be 0 code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@47 PS1, Line 47: uint32_t Reserved :30; // must be 0 please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@47 PS1, Line 47: uint32_t Reserved :30; // must be 0 please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@51 PS1, Line 51: uint8_t StmSpecVerMajor; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@51 PS1, Line 51: uint8_t StmSpecVerMajor; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@51 PS1, Line 51: uint8_t StmSpecVerMajor; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@52 PS1, Line 52: uint8_t StmSpecVerMinor; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@52 PS1, Line 52: uint8_t StmSpecVerMinor; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@52 PS1, Line 52: uint8_t StmSpecVerMinor; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@53 PS1, Line 53: uint16_t Reserved; // must be zero code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@53 PS1, Line 53: uint16_t Reserved; // must be zero please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@53 PS1, Line 53: uint16_t Reserved; // must be zero please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@54 PS1, Line 54: uint32_t StaticImageSize; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@54 PS1, Line 54: uint32_t StaticImageSize; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@54 PS1, Line 54: uint32_t StaticImageSize; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@55 PS1, Line 55: uint32_t PerProcDynamicMemorySize; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@55 PS1, Line 55: uint32_t PerProcDynamicMemorySize; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@55 PS1, Line 55: uint32_t PerProcDynamicMemorySize; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@56 PS1, Line 56: uint32_t AdditionalDynamicMemorySize; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@56 PS1, Line 56: uint32_t AdditionalDynamicMemorySize; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@56 PS1, Line 56: uint32_t AdditionalDynamicMemorySize; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@57 PS1, Line 57: STM_FEAT StmFeatures; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@57 PS1, Line 57: STM_FEAT StmFeatures; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@57 PS1, Line 57: STM_FEAT StmFeatures; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@58 PS1, Line 58: uint32_t NumberOfRevIDs; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@58 PS1, Line 58: uint32_t NumberOfRevIDs; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@58 PS1, Line 58: uint32_t NumberOfRevIDs; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@59 PS1, Line 59: uint32_t StmSmmRevID[1]; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@59 PS1, Line 59: uint32_t StmSmmRevID[1]; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@59 PS1, Line 59: uint32_t StmSmmRevID[1]; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@66 PS1, Line 66: HARDWARE_STM_HEADER HwStmHdr; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@66 PS1, Line 66: HARDWARE_STM_HEADER HwStmHdr; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@66 PS1, Line 66: HARDWARE_STM_HEADER HwStmHdr; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@67 PS1, Line 67: SOFTWARE_STM_HEADER SwStmHdr; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@67 PS1, Line 67: SOFTWARE_STM_HEADER SwStmHdr; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@67 PS1, Line 67: SOFTWARE_STM_HEADER SwStmHdr; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@73 PS1, Line 73: uint64_t BiosComponentBase; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@73 PS1, Line 73: uint64_t BiosComponentBase; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@73 PS1, Line 73: uint64_t BiosComponentBase; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@74 PS1, Line 74: uint32_t ImageSize; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@74 PS1, Line 74: uint32_t ImageSize; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@74 PS1, Line 74: uint32_t ImageSize; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@75 PS1, Line 75: uint32_t HashAlgorithm; // SHA1 or SHA256 code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@75 PS1, Line 75: uint32_t HashAlgorithm; // SHA1 or SHA256 please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@75 PS1, Line 75: uint32_t HashAlgorithm; // SHA1 or SHA256 please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@76 PS1, Line 76: uint8_t Hash[32]; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@76 PS1, Line 76: uint8_t Hash[32]; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@76 PS1, Line 76: uint8_t Hash[32]; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@81 PS1, Line 81: uint32_t ImageSize; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@81 PS1, Line 81: uint32_t ImageSize; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@81 PS1, Line 81: uint32_t ImageSize; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@82 PS1, Line 82: uint32_t Reserved; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@82 PS1, Line 82: uint32_t Reserved; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@82 PS1, Line 82: uint32_t Reserved; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@83 PS1, Line 83: uint64_t ImagePageBase[1]; //[NumberOfPages]; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@83 PS1, Line 83: uint64_t ImagePageBase[1]; //[NumberOfPages]; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@83 PS1, Line 83: uint64_t ImagePageBase[1]; //[NumberOfPages]; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@94 PS1, Line 94: uint64_t SpeRip; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@94 PS1, Line 94: uint64_t SpeRip; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@94 PS1, Line 94: uint64_t SpeRip; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@95 PS1, Line 95: uint64_t SpeRsp; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@95 PS1, Line 95: uint64_t SpeRsp; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@95 PS1, Line 95: uint64_t SpeRsp; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@96 PS1, Line 96: uint16_t SpeSs; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@96 PS1, Line 96: uint16_t SpeSs; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@96 PS1, Line 96: uint16_t SpeSs; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@97 PS1, Line 97: uint16_t PageViolationException:1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@97 PS1, Line 97: uint16_t PageViolationException:1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@97 PS1, Line 97: uint16_t PageViolationException:1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@98 PS1, Line 98: uint16_t MsrViolationException:1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@98 PS1, Line 98: uint16_t MsrViolationException:1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@98 PS1, Line 98: uint16_t MsrViolationException:1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@99 PS1, Line 99: uint16_t RegisterViolationException:1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@99 PS1, Line 99: uint16_t RegisterViolationException:1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@99 PS1, Line 99: uint16_t RegisterViolationException:1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@100 PS1, Line 100: uint16_t IoViolationException:1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@100 PS1, Line 100: uint16_t IoViolationException:1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@100 PS1, Line 100: uint16_t IoViolationException:1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@101 PS1, Line 101: uint16_t PciViolationException:1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@101 PS1, Line 101: uint16_t PciViolationException:1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@101 PS1, Line 101: uint16_t PciViolationException:1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@102 PS1, Line 102: uint16_t Reserved1:11; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@102 PS1, Line 102: uint16_t Reserved1:11; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@102 PS1, Line 102: uint16_t Reserved1:11; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@103 PS1, Line 103: uint32_t Reserved2; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@103 PS1, Line 103: uint32_t Reserved2; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@103 PS1, Line 103: uint32_t Reserved2; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@107 PS1, Line 107: uint8_t ExecutionDisableOutsideSmrr:1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@107 PS1, Line 107: uint8_t ExecutionDisableOutsideSmrr:1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@107 PS1, Line 107: uint8_t ExecutionDisableOutsideSmrr:1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@108 PS1, Line 108: uint8_t Intel64Mode:1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@108 PS1, Line 108: uint8_t Intel64Mode:1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@108 PS1, Line 108: uint8_t Intel64Mode:1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@109 PS1, Line 109: uint8_t Cr4Pae : 1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@109 PS1, Line 109: uint8_t Cr4Pae : 1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@109 PS1, Line 109: uint8_t Cr4Pae : 1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@110 PS1, Line 110: uint8_t Cr4Pse : 1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@110 PS1, Line 110: uint8_t Cr4Pse : 1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@110 PS1, Line 110: uint8_t Cr4Pse : 1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@111 PS1, Line 111: uint8_t Reserved1 : 4; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@111 PS1, Line 111: uint8_t Reserved1 : 4; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@111 PS1, Line 111: uint8_t Reserved1 : 4; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@115 PS1, Line 115: uint8_t SmramToVmcsRestoreRequired : 1; // BIOS restore hint code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@115 PS1, Line 115: uint8_t SmramToVmcsRestoreRequired : 1; // BIOS restore hint please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@115 PS1, Line 115: uint8_t SmramToVmcsRestoreRequired : 1; // BIOS restore hint please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@116 PS1, Line 116: uint8_t ReinitializeVmcsRequired : 1; // BIOS request code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@116 PS1, Line 116: uint8_t ReinitializeVmcsRequired : 1; // BIOS request please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@116 PS1, Line 116: uint8_t ReinitializeVmcsRequired : 1; // BIOS request please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@117 PS1, Line 117: uint8_t Reserved2 : 6; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@117 PS1, Line 117: uint8_t Reserved2 : 6; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@117 PS1, Line 117: uint8_t Reserved2 : 6; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@121 PS1, Line 121: uint8_t DomainType : 4; // STM input to BIOS on each SM code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@121 PS1, Line 121: uint8_t DomainType : 4; // STM input to BIOS on each SM please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@121 PS1, Line 121: uint8_t DomainType : 4; // STM input to BIOS on each SM please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@122 PS1, Line 122: uint8_t XStatePolicy : 2; // STM input to BIOS on each SMI code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@122 PS1, Line 122: uint8_t XStatePolicy : 2; // STM input to BIOS on each SMI please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@122 PS1, Line 122: uint8_t XStatePolicy : 2; // STM input to BIOS on each SMI please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@123 PS1, Line 123: uint8_t EptEnabled : 1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@123 PS1, Line 123: uint8_t EptEnabled : 1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@123 PS1, Line 123: uint8_t EptEnabled : 1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@124 PS1, Line 124: uint8_t Reserved3 : 1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@124 PS1, Line 124: uint8_t Reserved3 : 1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@124 PS1, Line 124: uint8_t Reserved3 : 1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@128 PS1, Line 128: uint64_t Signature; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@128 PS1, Line 128: uint64_t Signature; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@128 PS1, Line 128: uint64_t Signature; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@129 PS1, Line 129: uint16_t Size; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@129 PS1, Line 129: uint16_t Size; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@129 PS1, Line 129: uint16_t Size; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@130 PS1, Line 130: uint8_t SmmDescriptorVerMajor; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@130 PS1, Line 130: uint8_t SmmDescriptorVerMajor; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@130 PS1, Line 130: uint8_t SmmDescriptorVerMajor; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@131 PS1, Line 131: uint8_t SmmDescriptorVerMinor; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@131 PS1, Line 131: uint8_t SmmDescriptorVerMinor; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@131 PS1, Line 131: uint8_t SmmDescriptorVerMinor; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@132 PS1, Line 132: uint32_t LocalApicId; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@132 PS1, Line 132: uint32_t LocalApicId; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@132 PS1, Line 132: uint32_t LocalApicId; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@133 PS1, Line 133: STM_SMM_ENTRY_STATE SmmEntryState; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@133 PS1, Line 133: STM_SMM_ENTRY_STATE SmmEntryState; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@133 PS1, Line 133: STM_SMM_ENTRY_STATE SmmEntryState; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@134 PS1, Line 134: STM_SMM_RESUME_STATE SmmResumeState; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@134 PS1, Line 134: STM_SMM_RESUME_STATE SmmResumeState; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@134 PS1, Line 134: STM_SMM_RESUME_STATE SmmResumeState; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@135 PS1, Line 135: STM_SMM_STATE StmSmmState; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@135 PS1, Line 135: STM_SMM_STATE StmSmmState; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@135 PS1, Line 135: STM_SMM_STATE StmSmmState; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@136 PS1, Line 136: uint8_t Reserved4; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@136 PS1, Line 136: uint8_t Reserved4; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@136 PS1, Line 136: uint8_t Reserved4; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@137 PS1, Line 137: uint16_t SmmCs; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@137 PS1, Line 137: uint16_t SmmCs; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@137 PS1, Line 137: uint16_t SmmCs; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@138 PS1, Line 138: uint16_t SmmDs; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@138 PS1, Line 138: uint16_t SmmDs; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@138 PS1, Line 138: uint16_t SmmDs; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@139 PS1, Line 139: uint16_t SmmSs; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@139 PS1, Line 139: uint16_t SmmSs; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@139 PS1, Line 139: uint16_t SmmSs; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@140 PS1, Line 140: uint16_t SmmOtherSegment; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@140 PS1, Line 140: uint16_t SmmOtherSegment; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@140 PS1, Line 140: uint16_t SmmOtherSegment; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@141 PS1, Line 141: uint16_t SmmTr; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@141 PS1, Line 141: uint16_t SmmTr; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@141 PS1, Line 141: uint16_t SmmTr; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@142 PS1, Line 142: uint16_t Reserved5; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@142 PS1, Line 142: uint16_t Reserved5; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@142 PS1, Line 142: uint16_t Reserved5; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@143 PS1, Line 143: uint64_t SmmCr3; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@143 PS1, Line 143: uint64_t SmmCr3; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@143 PS1, Line 143: uint64_t SmmCr3; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@144 PS1, Line 144: uint64_t SmmStmSetupRip; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@144 PS1, Line 144: uint64_t SmmStmSetupRip; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@144 PS1, Line 144: uint64_t SmmStmSetupRip; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@145 PS1, Line 145: uint64_t SmmStmTeardownRip; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@145 PS1, Line 145: uint64_t SmmStmTeardownRip; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@145 PS1, Line 145: uint64_t SmmStmTeardownRip; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@146 PS1, Line 146: uint64_t SmmSmiHandlerRip; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@146 PS1, Line 146: uint64_t SmmSmiHandlerRip; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@146 PS1, Line 146: uint64_t SmmSmiHandlerRip; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@147 PS1, Line 147: uint64_t SmmSmiHandlerRsp; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@147 PS1, Line 147: uint64_t SmmSmiHandlerRsp; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@147 PS1, Line 147: uint64_t SmmSmiHandlerRsp; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@148 PS1, Line 148: uint64_t SmmGdtPtr; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@148 PS1, Line 148: uint64_t SmmGdtPtr; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@148 PS1, Line 148: uint64_t SmmGdtPtr; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@149 PS1, Line 149: uint32_t SmmGdtSize; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@149 PS1, Line 149: uint32_t SmmGdtSize; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@149 PS1, Line 149: uint32_t SmmGdtSize; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@150 PS1, Line 150: uint32_t RequiredStmSmmRevId; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@150 PS1, Line 150: uint32_t RequiredStmSmmRevId; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@150 PS1, Line 150: uint32_t RequiredStmSmmRevId; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@151 PS1, Line 151: STM_PROTECTION_EXCEPTION_HANDLER StmProtectionExceptionHandler; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@151 PS1, Line 151: STM_PROTECTION_EXCEPTION_HANDLER StmProtectionExceptionHandler; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@151 PS1, Line 151: STM_PROTECTION_EXCEPTION_HANDLER StmProtectionExceptionHandler; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@152 PS1, Line 152: uint64_t Reserved6; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@152 PS1, Line 152: uint64_t Reserved6; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@152 PS1, Line 152: uint64_t Reserved6; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@153 PS1, Line 153: uint64_t BiosHwResourceRequirementsPtr; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@153 PS1, Line 153: uint64_t BiosHwResourceRequirementsPtr; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@153 PS1, Line 153: uint64_t BiosHwResourceRequirementsPtr; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@155 PS1, Line 155: uint64_t AcpiRsdp; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@155 PS1, Line 155: uint64_t AcpiRsdp; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@155 PS1, Line 155: uint64_t AcpiRsdp; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@156 PS1, Line 156: uint8_t PhysicalAddressBits; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@156 PS1, Line 156: uint8_t PhysicalAddressBits; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@156 PS1, Line 156: uint8_t PhysicalAddressBits; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@166 PS1, Line 166: TxtSmmPageViolation = 1, code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@166 PS1, Line 166: TxtSmmPageViolation = 1, please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@166 PS1, Line 166: TxtSmmPageViolation = 1, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@167 PS1, Line 167: TxtSmmMsrViolation, code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@167 PS1, Line 167: TxtSmmMsrViolation, please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@167 PS1, Line 167: TxtSmmMsrViolation, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@168 PS1, Line 168: TxtSmmRegisterViolation, code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@168 PS1, Line 168: TxtSmmRegisterViolation, please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@168 PS1, Line 168: TxtSmmRegisterViolation, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@169 PS1, Line 169: TxtSmmIoViolation, code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@169 PS1, Line 169: TxtSmmIoViolation, please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@169 PS1, Line 169: TxtSmmIoViolation, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@170 PS1, Line 170: TxtSmmPciViolation code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@170 PS1, Line 170: TxtSmmPciViolation please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@170 PS1, Line 170: TxtSmmPciViolation please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@174 PS1, Line 174: uint32_t Rdi; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@174 PS1, Line 174: uint32_t Rdi; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@174 PS1, Line 174: uint32_t Rdi; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@175 PS1, Line 175: uint32_t Rsi; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@175 PS1, Line 175: uint32_t Rsi; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@175 PS1, Line 175: uint32_t Rsi; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@176 PS1, Line 176: uint32_t Rbp; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@176 PS1, Line 176: uint32_t Rbp; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@176 PS1, Line 176: uint32_t Rbp; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@177 PS1, Line 177: uint32_t Rdx; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@177 PS1, Line 177: uint32_t Rdx; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@177 PS1, Line 177: uint32_t Rdx; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@178 PS1, Line 178: uint32_t Rcx; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@178 PS1, Line 178: uint32_t Rcx; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@178 PS1, Line 178: uint32_t Rcx; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@179 PS1, Line 179: uint32_t Rbx; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@179 PS1, Line 179: uint32_t Rbx; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@179 PS1, Line 179: uint32_t Rbx; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@180 PS1, Line 180: uint32_t Rax; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@180 PS1, Line 180: uint32_t Rax; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@180 PS1, Line 180: uint32_t Rax; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@181 PS1, Line 181: uint32_t Cr3; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@181 PS1, Line 181: uint32_t Cr3; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@181 PS1, Line 181: uint32_t Cr3; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@182 PS1, Line 182: uint32_t Cr2; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@182 PS1, Line 182: uint32_t Cr2; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@182 PS1, Line 182: uint32_t Cr2; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@183 PS1, Line 183: uint32_t Cr0; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@183 PS1, Line 183: uint32_t Cr0; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@183 PS1, Line 183: uint32_t Cr0; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@184 PS1, Line 184: uint32_t VmcsExitInstructionInfo; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@184 PS1, Line 184: uint32_t VmcsExitInstructionInfo; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@184 PS1, Line 184: uint32_t VmcsExitInstructionInfo; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@185 PS1, Line 185: uint32_t VmcsExitInstructionLength; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@185 PS1, Line 185: uint32_t VmcsExitInstructionLength; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@185 PS1, Line 185: uint32_t VmcsExitInstructionLength; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@186 PS1, Line 186: uint64_t VmcsExitQualification; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@186 PS1, Line 186: uint64_t VmcsExitQualification; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@186 PS1, Line 186: uint64_t VmcsExitQualification; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@187 PS1, Line 187: uint32_t ErrorCode; // TXT_SMM_PROTECTION_EXCEPTION_TYPE code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@187 PS1, Line 187: uint32_t ErrorCode; // TXT_SMM_PROTECTION_EXCEPTION_TYPE please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@187 PS1, Line 187: uint32_t ErrorCode; // TXT_SMM_PROTECTION_EXCEPTION_TYPE please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@188 PS1, Line 188: uint32_t Rip; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@188 PS1, Line 188: uint32_t Rip; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@188 PS1, Line 188: uint32_t Rip; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@189 PS1, Line 189: uint32_t Cs; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@189 PS1, Line 189: uint32_t Cs; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@189 PS1, Line 189: uint32_t Cs; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@190 PS1, Line 190: uint32_t Rflags; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@190 PS1, Line 190: uint32_t Rflags; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@190 PS1, Line 190: uint32_t Rflags; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@191 PS1, Line 191: uint32_t Rsp; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@191 PS1, Line 191: uint32_t Rsp; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@191 PS1, Line 191: uint32_t Rsp; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@192 PS1, Line 192: uint32_t Ss; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@192 PS1, Line 192: uint32_t Ss; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@192 PS1, Line 192: uint32_t Ss; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@196 PS1, Line 196: uint64_t R15; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@196 PS1, Line 196: uint64_t R15; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@196 PS1, Line 196: uint64_t R15; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@197 PS1, Line 197: uint64_t R14; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@197 PS1, Line 197: uint64_t R14; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@197 PS1, Line 197: uint64_t R14; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@198 PS1, Line 198: uint64_t R13; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@198 PS1, Line 198: uint64_t R13; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@198 PS1, Line 198: uint64_t R13; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@199 PS1, Line 199: uint64_t R12; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@199 PS1, Line 199: uint64_t R12; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@199 PS1, Line 199: uint64_t R12; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@200 PS1, Line 200: uint64_t R11; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@200 PS1, Line 200: uint64_t R11; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@200 PS1, Line 200: uint64_t R11; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@201 PS1, Line 201: uint64_t R10; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@201 PS1, Line 201: uint64_t R10; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@201 PS1, Line 201: uint64_t R10; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@202 PS1, Line 202: uint64_t R9; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@202 PS1, Line 202: uint64_t R9; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@202 PS1, Line 202: uint64_t R9; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@203 PS1, Line 203: uint64_t R8; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@203 PS1, Line 203: uint64_t R8; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@203 PS1, Line 203: uint64_t R8; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@204 PS1, Line 204: uint64_t Rdi; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@204 PS1, Line 204: uint64_t Rdi; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@204 PS1, Line 204: uint64_t Rdi; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@205 PS1, Line 205: uint64_t Rsi; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@205 PS1, Line 205: uint64_t Rsi; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@205 PS1, Line 205: uint64_t Rsi; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@206 PS1, Line 206: uint64_t Rbp; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@206 PS1, Line 206: uint64_t Rbp; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@206 PS1, Line 206: uint64_t Rbp; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@207 PS1, Line 207: uint64_t Rdx; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@207 PS1, Line 207: uint64_t Rdx; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@207 PS1, Line 207: uint64_t Rdx; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@208 PS1, Line 208: uint64_t Rcx; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@208 PS1, Line 208: uint64_t Rcx; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@208 PS1, Line 208: uint64_t Rcx; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@209 PS1, Line 209: uint64_t Rbx; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@209 PS1, Line 209: uint64_t Rbx; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@209 PS1, Line 209: uint64_t Rbx; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@210 PS1, Line 210: uint64_t Rax; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@210 PS1, Line 210: uint64_t Rax; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@210 PS1, Line 210: uint64_t Rax; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@211 PS1, Line 211: uint64_t Cr8; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@211 PS1, Line 211: uint64_t Cr8; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@211 PS1, Line 211: uint64_t Cr8; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@212 PS1, Line 212: uint64_t Cr3; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@212 PS1, Line 212: uint64_t Cr3; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@212 PS1, Line 212: uint64_t Cr3; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@213 PS1, Line 213: uint64_t Cr2; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@213 PS1, Line 213: uint64_t Cr2; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@213 PS1, Line 213: uint64_t Cr2; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@214 PS1, Line 214: uint64_t Cr0; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@214 PS1, Line 214: uint64_t Cr0; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@214 PS1, Line 214: uint64_t Cr0; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@215 PS1, Line 215: uint64_t VmcsExitInstructionInfo; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@215 PS1, Line 215: uint64_t VmcsExitInstructionInfo; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@215 PS1, Line 215: uint64_t VmcsExitInstructionInfo; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@216 PS1, Line 216: uint64_t VmcsExitInstructionLength; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@216 PS1, Line 216: uint64_t VmcsExitInstructionLength; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@216 PS1, Line 216: uint64_t VmcsExitInstructionLength; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@217 PS1, Line 217: uint64_t VmcsExitQualification; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@217 PS1, Line 217: uint64_t VmcsExitQualification; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@217 PS1, Line 217: uint64_t VmcsExitQualification; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@218 PS1, Line 218: uint64_t ErrorCode; // TXT_SMM_PROTECTION_EXCEPTION_TYPE code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@218 PS1, Line 218: uint64_t ErrorCode; // TXT_SMM_PROTECTION_EXCEPTION_TYPE please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@218 PS1, Line 218: uint64_t ErrorCode; // TXT_SMM_PROTECTION_EXCEPTION_TYPE please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@219 PS1, Line 219: uint64_t Rip; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@219 PS1, Line 219: uint64_t Rip; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@219 PS1, Line 219: uint64_t Rip; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@220 PS1, Line 220: uint64_t Cs; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@220 PS1, Line 220: uint64_t Cs; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@220 PS1, Line 220: uint64_t Cs; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@221 PS1, Line 221: uint64_t Rflags; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@221 PS1, Line 221: uint64_t Rflags; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@221 PS1, Line 221: uint64_t Rflags; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@222 PS1, Line 222: uint64_t Rsp; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@222 PS1, Line 222: uint64_t Rsp; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@222 PS1, Line 222: uint64_t Rsp; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@223 PS1, Line 223: uint64_t Ss; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@223 PS1, Line 223: uint64_t Ss; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@223 PS1, Line 223: uint64_t Ss; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@227 PS1, Line 227: STM_PROTECTION_EXCEPTION_STACK_FRAME_IA32 *Ia32StackFrame; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@227 PS1, Line 227: STM_PROTECTION_EXCEPTION_STACK_FRAME_IA32 *Ia32StackFrame; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@227 PS1, Line 227: STM_PROTECTION_EXCEPTION_STACK_FRAME_IA32 *Ia32StackFrame; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@228 PS1, Line 228: STM_PROTECTION_EXCEPTION_STACK_FRAME_X64 *X64StackFrame; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@228 PS1, Line 228: STM_PROTECTION_EXCEPTION_STACK_FRAME_X64 *X64StackFrame; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@228 PS1, Line 228: STM_PROTECTION_EXCEPTION_STACK_FRAME_X64 *X64StackFrame; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@234 PS1, Line 234: uint8_t Reserved1[0x1d0]; // fc00h code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@234 PS1, Line 234: uint8_t Reserved1[0x1d0]; // fc00h please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@234 PS1, Line 234: uint8_t Reserved1[0x1d0]; // fc00h please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@235 PS1, Line 235: uint32_t GdtBaseHiDword; // fdd0h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@235 PS1, Line 235: uint32_t GdtBaseHiDword; // fdd0h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@235 PS1, Line 235: uint32_t GdtBaseHiDword; // fdd0h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@236 PS1, Line 236: uint32_t LdtBaseHiDword; // fdd4h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@236 PS1, Line 236: uint32_t LdtBaseHiDword; // fdd4h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@236 PS1, Line 236: uint32_t LdtBaseHiDword; // fdd4h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@237 PS1, Line 237: uint32_t IdtBaseHiDword; // fdd8h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@237 PS1, Line 237: uint32_t IdtBaseHiDword; // fdd8h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@237 PS1, Line 237: uint32_t IdtBaseHiDword; // fdd8h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@238 PS1, Line 238: uint8_t Reserved2[0x4]; // fddch code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@238 PS1, Line 238: uint8_t Reserved2[0x4]; // fddch please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@238 PS1, Line 238: uint8_t Reserved2[0x4]; // fddch please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@239 PS1, Line 239: uint64_t IoRdi; // fde0h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@239 PS1, Line 239: uint64_t IoRdi; // fde0h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@239 PS1, Line 239: uint64_t IoRdi; // fde0h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@240 PS1, Line 240: // - restricted code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@241 PS1, Line 241: uint64_t IoEip; // fde8h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@241 PS1, Line 241: uint64_t IoEip; // fde8h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@241 PS1, Line 241: uint64_t IoEip; // fde8h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@242 PS1, Line 242: uint64_t IoRcx; // fdf0h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@242 PS1, Line 242: uint64_t IoRcx; // fdf0h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@242 PS1, Line 242: uint64_t IoRcx; // fdf0h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@243 PS1, Line 243: // - restricted code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@244 PS1, Line 244: uint64_t IoRsi; // fdf8h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@244 PS1, Line 244: uint64_t IoRsi; // fdf8h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@244 PS1, Line 244: uint64_t IoRsi; // fdf8h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@245 PS1, Line 245: // - restricted code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@246 PS1, Line 246: uint8_t Reserved3[0x40]; // fe00h code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@246 PS1, Line 246: uint8_t Reserved3[0x40]; // fe00h please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@246 PS1, Line 246: uint8_t Reserved3[0x40]; // fe00h please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@247 PS1, Line 247: uint32_t Cr4; // fe40h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@247 PS1, Line 247: uint32_t Cr4; // fe40h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@247 PS1, Line 247: uint32_t Cr4; // fe40h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@248 PS1, Line 248: uint8_t Reserved4[0x48]; // fe44h code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@248 PS1, Line 248: uint8_t Reserved4[0x48]; // fe44h please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@248 PS1, Line 248: uint8_t Reserved4[0x48]; // fe44h please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@249 PS1, Line 249: uint32_t GdtBaseLoDword; // fe8ch : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@249 PS1, Line 249: uint32_t GdtBaseLoDword; // fe8ch : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@249 PS1, Line 249: uint32_t GdtBaseLoDword; // fe8ch : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@250 PS1, Line 250: uint32_t GdtLimit; // fe90h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@250 PS1, Line 250: uint32_t GdtLimit; // fe90h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@250 PS1, Line 250: uint32_t GdtLimit; // fe90h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@251 PS1, Line 251: // - RESTRICTED code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@252 PS1, Line 252: uint32_t IdtBaseLoDword; // fe94h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@252 PS1, Line 252: uint32_t IdtBaseLoDword; // fe94h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@252 PS1, Line 252: uint32_t IdtBaseLoDword; // fe94h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@253 PS1, Line 253: uint32_t IdtLimit; // fe98h : NO trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@253 PS1, Line 253: uint32_t IdtLimit; // fe98h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@253 PS1, Line 253: uint32_t IdtLimit; // fe98h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@253 PS1, Line 253: uint32_t IdtLimit; // fe98h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@254 PS1, Line 254: // - RESTRICTED code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@255 PS1, Line 255: uint32_t LdtBaseLoDword; // fe9ch : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@255 PS1, Line 255: uint32_t LdtBaseLoDword; // fe9ch : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@255 PS1, Line 255: uint32_t LdtBaseLoDword; // fe9ch : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@256 PS1, Line 256: uint32_t LdtLimit; // fea0h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@256 PS1, Line 256: uint32_t LdtLimit; // fea0h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@256 PS1, Line 256: uint32_t LdtLimit; // fea0h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@257 PS1, Line 257: // - RESTRICTED code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@258 PS1, Line 258: uint32_t LdtInfo; // fea4h : NO trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@258 PS1, Line 258: uint32_t LdtInfo; // fea4h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@258 PS1, Line 258: uint32_t LdtInfo; // fea4h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@258 PS1, Line 258: uint32_t LdtInfo; // fea4h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@259 PS1, Line 259: // - RESTRICTED code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@260 PS1, Line 260: uint8_t Reserved5[0x30]; // fea8h code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@260 PS1, Line 260: uint8_t Reserved5[0x30]; // fea8h please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@260 PS1, Line 260: uint8_t Reserved5[0x30]; // fea8h please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@261 PS1, Line 261: uint64_t Eptp; // fed8h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@261 PS1, Line 261: uint64_t Eptp; // fed8h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@261 PS1, Line 261: uint64_t Eptp; // fed8h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@262 PS1, Line 262: uint32_t EnabledEPT; // fee0h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@262 PS1, Line 262: uint32_t EnabledEPT; // fee0h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@262 PS1, Line 262: uint32_t EnabledEPT; // fee0h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@263 PS1, Line 263: uint8_t Reserved6[0x14]; // fee4h code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@263 PS1, Line 263: uint8_t Reserved6[0x14]; // fee4h please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@263 PS1, Line 263: uint8_t Reserved6[0x14]; // fee4h please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@264 PS1, Line 264: uint32_t Smbase; // fef8h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@264 PS1, Line 264: uint32_t Smbase; // fef8h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@264 PS1, Line 264: uint32_t Smbase; // fef8h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@265 PS1, Line 265: // - NO for STM code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@266 PS1, Line 266: uint32_t SMMRevId; // fefch : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@266 PS1, Line 266: uint32_t SMMRevId; // fefch : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@266 PS1, Line 266: uint32_t SMMRevId; // fefch : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@267 PS1, Line 267: uint16_t IORestart; // ff00h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@267 PS1, Line 267: uint16_t IORestart; // ff00h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@267 PS1, Line 267: uint16_t IORestart; // ff00h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@268 PS1, Line 268: uint16_t AutoHALTRestart; // ff02h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@268 PS1, Line 268: uint16_t AutoHALTRestart; // ff02h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@268 PS1, Line 268: uint16_t AutoHALTRestart; // ff02h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@269 PS1, Line 269: uint8_t Reserved7[0x18]; // ff04h code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@269 PS1, Line 269: uint8_t Reserved7[0x18]; // ff04h please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@269 PS1, Line 269: uint8_t Reserved7[0x18]; // ff04h please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@270 PS1, Line 270: uint64_t R15; // ff1ch : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@270 PS1, Line 270: uint64_t R15; // ff1ch : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@270 PS1, Line 270: uint64_t R15; // ff1ch : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@271 PS1, Line 271: uint64_t R14; // ff24h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@271 PS1, Line 271: uint64_t R14; // ff24h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@271 PS1, Line 271: uint64_t R14; // ff24h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@272 PS1, Line 272: uint64_t R13; // ff2ch : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@272 PS1, Line 272: uint64_t R13; // ff2ch : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@272 PS1, Line 272: uint64_t R13; // ff2ch : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@273 PS1, Line 273: uint64_t R12; // ff34h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@273 PS1, Line 273: uint64_t R12; // ff34h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@273 PS1, Line 273: uint64_t R12; // ff34h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@274 PS1, Line 274: uint64_t R11; // ff3ch : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@274 PS1, Line 274: uint64_t R11; // ff3ch : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@274 PS1, Line 274: uint64_t R11; // ff3ch : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@275 PS1, Line 275: uint64_t R10; // ff44h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@275 PS1, Line 275: uint64_t R10; // ff44h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@275 PS1, Line 275: uint64_t R10; // ff44h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@276 PS1, Line 276: uint64_t R9; // ff4ch : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@276 PS1, Line 276: uint64_t R9; // ff4ch : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@276 PS1, Line 276: uint64_t R9; // ff4ch : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@277 PS1, Line 277: uint64_t R8; // ff54h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@277 PS1, Line 277: uint64_t R8; // ff54h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@277 PS1, Line 277: uint64_t R8; // ff54h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@278 PS1, Line 278: uint64_t Rax; // ff5ch : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@278 PS1, Line 278: uint64_t Rax; // ff5ch : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@278 PS1, Line 278: uint64_t Rax; // ff5ch : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@279 PS1, Line 279: uint64_t Rcx; // ff64h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@279 PS1, Line 279: uint64_t Rcx; // ff64h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@279 PS1, Line 279: uint64_t Rcx; // ff64h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@280 PS1, Line 280: uint64_t Rdx; // ff6ch : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@280 PS1, Line 280: uint64_t Rdx; // ff6ch : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@280 PS1, Line 280: uint64_t Rdx; // ff6ch : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@281 PS1, Line 281: uint64_t Rbx; // ff74h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@281 PS1, Line 281: uint64_t Rbx; // ff74h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@281 PS1, Line 281: uint64_t Rbx; // ff74h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@282 PS1, Line 282: uint64_t Rsp; // ff7ch : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@282 PS1, Line 282: uint64_t Rsp; // ff7ch : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@282 PS1, Line 282: uint64_t Rsp; // ff7ch : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@283 PS1, Line 283: uint64_t Rbp; // ff84h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@283 PS1, Line 283: uint64_t Rbp; // ff84h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@283 PS1, Line 283: uint64_t Rbp; // ff84h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@284 PS1, Line 284: uint64_t Rsi; // ff8ch : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@284 PS1, Line 284: uint64_t Rsi; // ff8ch : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@284 PS1, Line 284: uint64_t Rsi; // ff8ch : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@285 PS1, Line 285: uint64_t Rdi; // ff94h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@285 PS1, Line 285: uint64_t Rdi; // ff94h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@285 PS1, Line 285: uint64_t Rdi; // ff94h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@286 PS1, Line 286: uint64_t IOMemAddr; // ff9ch : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@286 PS1, Line 286: uint64_t IOMemAddr; // ff9ch : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@286 PS1, Line 286: uint64_t IOMemAddr; // ff9ch : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@287 PS1, Line 287: uint32_t IOMisc; // ffa4h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@287 PS1, Line 287: uint32_t IOMisc; // ffa4h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@287 PS1, Line 287: uint32_t IOMisc; // ffa4h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@288 PS1, Line 288: uint32_t Es; // ffa8h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@288 PS1, Line 288: uint32_t Es; // ffa8h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@288 PS1, Line 288: uint32_t Es; // ffa8h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@289 PS1, Line 289: uint32_t Cs; // ffach : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@289 PS1, Line 289: uint32_t Cs; // ffach : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@289 PS1, Line 289: uint32_t Cs; // ffach : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@290 PS1, Line 290: uint32_t Ss; // ffb0h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@290 PS1, Line 290: uint32_t Ss; // ffb0h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@290 PS1, Line 290: uint32_t Ss; // ffb0h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@291 PS1, Line 291: uint32_t Ds; // ffb4h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@291 PS1, Line 291: uint32_t Ds; // ffb4h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@291 PS1, Line 291: uint32_t Ds; // ffb4h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@292 PS1, Line 292: uint32_t Fs; // ffb8h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@292 PS1, Line 292: uint32_t Fs; // ffb8h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@292 PS1, Line 292: uint32_t Fs; // ffb8h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@293 PS1, Line 293: uint32_t Gs; // ffbch : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@293 PS1, Line 293: uint32_t Gs; // ffbch : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@293 PS1, Line 293: uint32_t Gs; // ffbch : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@294 PS1, Line 294: uint32_t Ldtr; // ffc0h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@294 PS1, Line 294: uint32_t Ldtr; // ffc0h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@294 PS1, Line 294: uint32_t Ldtr; // ffc0h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@295 PS1, Line 295: uint32_t Tr; // ffc4h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@295 PS1, Line 295: uint32_t Tr; // ffc4h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@295 PS1, Line 295: uint32_t Tr; // ffc4h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@296 PS1, Line 296: uint64_t Dr7; // ffc8h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@296 PS1, Line 296: uint64_t Dr7; // ffc8h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@296 PS1, Line 296: uint64_t Dr7; // ffc8h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@297 PS1, Line 297: uint64_t Dr6; // ffd0h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@297 PS1, Line 297: uint64_t Dr6; // ffd0h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@297 PS1, Line 297: uint64_t Dr6; // ffd0h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@298 PS1, Line 298: uint64_t Rip; // ffd8h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@298 PS1, Line 298: uint64_t Rip; // ffd8h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@298 PS1, Line 298: uint64_t Rip; // ffd8h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@299 PS1, Line 299: uint64_t Ia32Efer; // ffe0h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@299 PS1, Line 299: uint64_t Ia32Efer; // ffe0h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@299 PS1, Line 299: uint64_t Ia32Efer; // ffe0h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@301 PS1, Line 301: uint64_t Rflags; // ffe8h : YES code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@301 PS1, Line 301: uint64_t Rflags; // ffe8h : YES please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@301 PS1, Line 301: uint64_t Rflags; // ffe8h : YES please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@302 PS1, Line 302: uint64_t Cr3; // fff0h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@302 PS1, Line 302: uint64_t Cr3; // fff0h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@302 PS1, Line 302: uint64_t Cr3; // fff0h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@303 PS1, Line 303: uint64_t Cr0; // fff8h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@303 PS1, Line 303: uint64_t Cr0; // fff8h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@303 PS1, Line 303: uint64_t Cr0; // fff8h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@312 PS1, Line 312: uint64_t VirtualAddress; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@312 PS1, Line 312: uint64_t VirtualAddress; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@312 PS1, Line 312: uint64_t VirtualAddress; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@313 PS1, Line 313: uint32_t PageCount; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@313 PS1, Line 313: uint32_t PageCount; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@313 PS1, Line 313: uint32_t PageCount; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@314 PS1, Line 314: uint32_t PatCacheType; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@314 PS1, Line 314: uint32_t PatCacheType; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@314 PS1, Line 314: uint32_t PatCacheType; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@325 PS1, Line 325: uint64_t VirtualAddress; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@325 PS1, Line 325: uint64_t VirtualAddress; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@325 PS1, Line 325: uint64_t VirtualAddress; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@326 PS1, Line 326: uint32_t Length; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@326 PS1, Line 326: uint32_t Length; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@326 PS1, Line 326: uint32_t Length; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@330 PS1, Line 330: uint64_t InterruptedGuestVirtualAddress; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@330 PS1, Line 330: uint64_t InterruptedGuestVirtualAddress; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@330 PS1, Line 330: uint64_t InterruptedGuestVirtualAddress; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@331 PS1, Line 331: uint32_t Length; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@331 PS1, Line 331: uint32_t Length; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@331 PS1, Line 331: uint32_t Length; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@332 PS1, Line 332: uint64_t InterruptedCr3; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@332 PS1, Line 332: uint64_t InterruptedCr3; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@332 PS1, Line 332: uint64_t InterruptedCr3; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@333 PS1, Line 333: uint64_t InterruptedEptp; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@333 PS1, Line 333: uint64_t InterruptedEptp; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@333 PS1, Line 333: uint64_t InterruptedEptp; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@334 PS1, Line 334: uint32_t MapToSmmGuest:2; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@334 PS1, Line 334: uint32_t MapToSmmGuest:2; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@334 PS1, Line 334: uint32_t MapToSmmGuest:2; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@335 PS1, Line 335: uint32_t InterruptedCr4Pae:1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@335 PS1, Line 335: uint32_t InterruptedCr4Pae:1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@335 PS1, Line 335: uint32_t InterruptedCr4Pae:1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@336 PS1, Line 336: uint32_t InterruptedCr4Pse:1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@336 PS1, Line 336: uint32_t InterruptedCr4Pse:1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@336 PS1, Line 336: uint32_t InterruptedCr4Pse:1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@337 PS1, Line 337: uint32_t InterruptedIa32eMode:1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@337 PS1, Line 337: uint32_t InterruptedIa32eMode:1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@337 PS1, Line 337: uint32_t InterruptedIa32eMode:1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@338 PS1, Line 338: uint32_t Reserved1:27; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@338 PS1, Line 338: uint32_t Reserved1:27; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@338 PS1, Line 338: uint32_t Reserved1:27; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@339 PS1, Line 339: uint32_t Reserved2; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@339 PS1, Line 339: uint32_t Reserved2; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@339 PS1, Line 339: uint32_t Reserved2; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@340 PS1, Line 340: uint64_t PhysicalAddress; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@340 PS1, Line 340: uint64_t PhysicalAddress; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@340 PS1, Line 340: uint64_t PhysicalAddress; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@341 PS1, Line 341: uint64_t SmmGuestVirtualAddress; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@341 PS1, Line 341: uint64_t SmmGuestVirtualAddress; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@341 PS1, Line 341: uint64_t SmmGuestVirtualAddress; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@364 PS1, Line 364: uint16_t ReturnStatus:1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@364 PS1, Line 364: uint16_t ReturnStatus:1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@364 PS1, Line 364: uint16_t ReturnStatus:1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@365 PS1, Line 365: uint16_t Reserved:14; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@365 PS1, Line 365: uint16_t Reserved:14; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@365 PS1, Line 365: uint16_t Reserved:14; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@366 PS1, Line 366: uint16_t IgnoreResource:1; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@366 PS1, Line 366: uint16_t IgnoreResource:1; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@366 PS1, Line 366: uint16_t IgnoreResource:1; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@505 PS1, Line 505: //#define DOMAIN_INTEGRITY_PROT_OUT (DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN) line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@507 PS1, Line 507: //#define DOMAIN_FULLY_PROT_IN (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_OUT) line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@508 PS1, Line 508: //#define DOMAIN_FULLY_PROT_OUT (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN) line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@509 PS1, Line 509: #define DOMAIN_FULLY_PROT (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN | DOMAIN_DISALLOWED_IO_OUT) line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmApi.h@751 PS1, Line 751: #pragma pack (pop) space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... File src/security/intel/stm/StmPlatformResource.h:
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 35: #define SMRR_PHYSMASK_MSR 0x1F3 trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 50: {MEM_RANGE, sizeof (STM_RSC_MEM_DESC)}, space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 59: {MEM_RANGE, sizeof (STM_RSC_MEM_DESC)}, space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 68: {IO_RANGE, sizeof (STM_RSC_IO_DESC)}, space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 77: {MMIO_RANGE, sizeof (STM_RSC_MMIO_DESC)}, space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 86: {MMIO_RANGE, sizeof (STM_RSC_MMIO_DESC)}, space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 95: {TRAPPED_IO_RANGE, sizeof (STM_RSC_TRAPPED_IO_DESC)}, space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 103: {END_OF_RESOURCES, sizeof (STM_RSC_END)}, space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 114: {PCI_CFG_RANGE, sizeof (STM_RSC_PCI_CFG_DESC)}, space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 115: RDWR_ACCS, 0, code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 115: RDWR_ACCS, 0, please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 115: RDWR_ACCS, 0, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 121: {1, 1, sizeof(STM_PCI_DEVICE_PATH_NODE), LPC_FUNCTION, LPC_DEVICE}, line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 121: {1, 1, sizeof(STM_PCI_DEVICE_PATH_NODE), LPC_FUNCTION, LPC_DEVICE}, code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 121: {1, 1, sizeof(STM_PCI_DEVICE_PATH_NODE), LPC_FUNCTION, LPC_DEVICE}, please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 121: {1, 1, sizeof(STM_PCI_DEVICE_PATH_NODE), LPC_FUNCTION, LPC_DEVICE}, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 129: {MACHINE_SPECIFIC_REG, sizeof (STM_RSC_MSR_DESC)}, space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 142: // Index Read Write // MASK64 means need access, MASK0 means no need access. line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 163: mTsegBase = MsrRead.lo & 0xFFFFF000; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 163: mTsegBase = MsrRead.lo & 0xFFFFF000; please, no space before tabs
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 163: mTsegBase = MsrRead.lo & 0xFFFFF000; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 164: trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 164: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 165: //mTsegSize = (uint32_t)(~((uint32_t)rdmsr(SMRR_PHYSMASK_MSR) & 0xFFFFF000) + 1); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 166: trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 166: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 181: // trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 204: trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 204: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 209: // be corrected. trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 219: FixupPciexResource (); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 237: for (Index = 0; Index < sizeof(MsrTable)/sizeof(MsrTable[0]); Index ++) { line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 237: for (Index = 0; Index < sizeof(MsrTable)/sizeof(MsrTable[0]); Index ++) { Prefer ARRAY_SIZE(MsrTable)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 237: for (Index = 0; Index < sizeof(MsrTable)/sizeof(MsrTable[0]); Index ++) { space prohibited before that '++' (ctx:WxB)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 238: trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 238: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 243: Status = AddPiResource ((void *) &RscMsrTpl, 1); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 52: StmBufferSize = CONFIG_MSEG_SIZE; trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 57: StmImageSize = cbfs_boot_load_file("stm.bin", MsegBase, StmBufferSize, CBFS_TYPE_RAW); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 58: printk(BIOS_DEBUG, "STM loaded into mseg: 0x%08x size: %u \n", (uint32_t) MsegBase, StmImageSize); /* status is number of bytes loaded */ line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 58: printk(BIOS_DEBUG, "STM loaded into mseg: 0x%08x size: %u \n", (uint32_t) MsegBase, StmImageSize); /* status is number of bytes loaded */ unnecessary whitespace before a quoted newline
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 64: StmGen4GPageTableX64 ((uint32_t)MsegBase + StmHeader->HwStmHdr.Cr3Offset); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 64: StmGen4GPageTableX64 ((uint32_t)MsegBase + StmHeader->HwStmHdr.Cr3Offset); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 72: printk(BIOS_DEBUG, "STM Header - StaticImageSize: %d Cr3Location: 0x%08x \n", unnecessary whitespace before a quoted newline
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 82: { open brace '{' following struct go on the same line
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 88: void ReadGdtr( struct descriptor *gdtr); space prohibited after that open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 90: void ReadGdtr( struct descriptor *gdtr) space prohibited after that open parenthesis '('
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 98: void SetupSmmDescriptor(void *smbase, int32_t state_size, int32_t apic_id, int32_t entry32_off) line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 102: TXT_PROCESSOR_SMM_DESCRIPTOR * Psd; "foo * bar" should be "foo *bar"
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 105: trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 106: printk(BIOS_DEBUG, "Setting up Smm Descriptor - Smbase: %p Psd: %p\n", smbase, Psd); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 108: memset(Psd, 0, sizeof(TXT_PROCESSOR_SMM_DESCRIPTOR)); trailing whitespace
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 113: Psd->SmmSmiHandlerRip = (uint64_t)((uint32_t)smbase + SMM_ENTRY_OFFSET + entry32_off); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 117: Psd->BiosHwResourceRequirementsPtr = (uint64_t)((uint32_t)GetStmResource()); line over 80 characters
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 127: Psd->SmmGdtSize = Gdtr.limit + 1; // the stm will subtract, so need to compensate line over 80 characters
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm STM support ......................................................................
Patch Set 1:
(6 comments)
Please don't use cammelcase. Most of the code looks very UEFI like.
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/Kconfig File src/security/intel/stm/Kconfig:
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/Kconfig@7 PS1, Line 7: depends on (PLATFORM_USES_FSP2_0||PLATFORM_USES_FSP1_1||PLATFORM_USES_FSP1_0) why do you need FSP for that?
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/Kconfig@12 PS1, Line 12: hex "mseg size" if this is user configureable, what are good values? Add help text
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 180: // Find max bus number and PCIEX length remove commented code
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 27: extern bool StmCheckStmImage(void *StmImage, uint32_t StmImageSize); don't use extern
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 38: int LoadStmImage(uint32_t mseg) uintptr_t
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 57: StmImageSize = cbfs_boot_load_file("stm.bin", MsegBase, StmBufferSize, CBFS_TYPE_RAW); check for errors
Name of user not set #1002358 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm STM support ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/Kconfig File src/security/intel/stm/Kconfig:
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/Kconfig@7 PS1, Line 7: depends on (PLATFORM_USES_FSP2_0||PLATFORM_USES_FSP1_1||PLATFORM_USES_FSP1_0)
why do you need FSP for that?
the FSP depends were suggested (on the original change that is split in this submission) by Philipp Deppenwiese to have this change be effective for all Intel processors.
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/Kconfig@12 PS1, Line 12: hex "mseg size"
if this is user configureable, what are good values? […]
generally 1MB should suffice for a STM only application and 3MB+ depending upon the size of the VM/PE that is used
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformRe... PS1, Line 180: // Find max bus number and PCIEX length
remove commented code
This is part of the code that is generating the access list for the SMI handler. What needs to be resolved here is how to determine the PCI Express Base address (PcdGet64(...)) in the Coreboot environment then I can fix that function.
Name of user not set #1002358 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm STM support ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 27: extern bool StmCheckStmImage(void *StmImage, uint32_t StmImageSize);
don't use extern
will be in updated changes
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/StmPlatformSm... PS1, Line 38: int LoadStmImage(uint32_t mseg)
uintptr_t
done - in next change update
Hello Christian Walter, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#2).
Change subject: security/intel/stm STM support ......................................................................
security/intel/stm STM support
Initial commit for Coreboot STM supporX
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,226 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/2
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm STM support ......................................................................
Patch Set 2:
(262 comments)
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@178 PS2, Line 178: ResourceHi = (uint64_t) Resource->Io.Base + code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@178 PS2, Line 178: ResourceHi = (uint64_t) Resource->Io.Base + please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@178 PS2, Line 178: ResourceHi = (uint64_t) Resource->Io.Base + please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@181 PS2, Line 181: RecordHi = (uint64_t) Record->Io.Base + code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@181 PS2, Line 181: RecordHi = (uint64_t) Record->Io.Base + please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@181 PS2, Line 181: RecordHi = (uint64_t) Record->Io.Base + please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@185 PS2, Line 185: if ((Resource->PciCfg.OriginatingBusNumber != suspect code indent for conditional statements (16, 32)
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@188 PS2, Line 188: Record->PciCfg.LastNodeIndex)) trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@190 PS2, Line 190: trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@191 PS2, Line 191: if (memcmp (Resource->PciCfg.PciDevicePath, suspect code indent for conditional statements (16, 32)
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@191 PS2, Line 191: if (memcmp (Resource->PciCfg.PciDevicePath, space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@201 PS2, Line 201: RecordHi = (uint64_t) Record->PciCfg.Base + trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@218 PS2, Line 218: // Special case - merge MSR masks in place. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@218 PS2, Line 218: // Special case - merge MSR masks in place. please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@218 PS2, Line 218: // Special case - merge MSR masks in place. please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@219 PS2, Line 219: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@219 PS2, Line 219: // please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@219 PS2, Line 219: // please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@222 PS2, Line 222: Record->Msr.ReadMask |= Resource->Msr.ReadMask; trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@223 PS2, Line 223: Record->Msr.WriteMask |= Resource->Msr.WriteMask; trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@232 PS2, Line 232: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@232 PS2, Line 232: return false; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@232 PS2, Line 232: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@236 PS2, Line 236: // trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@240 PS2, Line 240: // Resources are overlapping. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@240 PS2, Line 240: // Resources are overlapping. please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@240 PS2, Line 240: // Resources are overlapping. please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@241 PS2, Line 241: // Resource and record are merged. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@241 PS2, Line 241: // Resource and record are merged. please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@241 PS2, Line 241: // Resource and record are merged. please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@242 PS2, Line 242: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@242 PS2, Line 242: // please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@242 PS2, Line 242: // please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@246 PS2, Line 246: switch (Resource->Header.RscType) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@246 PS2, Line 246: switch (Resource->Header.RscType) { please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@246 PS2, Line 246: switch (Resource->Header.RscType) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@251 PS2, Line 251: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@251 PS2, Line 251: break; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@251 PS2, Line 251: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@254 PS2, Line 254: Record->Io.Base = (uint64_t) ResourceLo; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@254 PS2, Line 254: Record->Io.Base = (uint64_t) ResourceLo; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@254 PS2, Line 254: Record->Io.Base = (uint64_t) ResourceLo; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@255 PS2, Line 255: Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo); code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@255 PS2, Line 255: Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo); please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@255 PS2, Line 255: Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@256 PS2, Line 256: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@256 PS2, Line 256: break; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@256 PS2, Line 256: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@260 PS2, Line 260: break; trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@262 PS2, Line 262: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@262 PS2, Line 262: return false; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@262 PS2, Line 262: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@288 PS2, Line 288: Record = (STM_RSC *)((void *)Record + Record->Header.Length); line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@289 PS2, Line 289: continue; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@289 PS2, Line 289: continue; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@289 PS2, Line 289: continue; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@294 PS2, Line 294: if (HandleSingleResource (Resource, Record)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@294 PS2, Line 294: if (HandleSingleResource (Resource, Record)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@295 PS2, Line 295: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@296 PS2, Line 296: } trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@296 PS2, Line 296: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@296 PS2, Line 296: } please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@296 PS2, Line 296: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@303 PS2, Line 303: memcpy ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@308 PS2, Line 308: memcpy ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@309 PS2, Line 309: mStmResourcesPtr + mStmResourceSizeUsed - sizeof(mRscEndNode) + Resource->Header.Length, line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@314 PS2, Line 314: mStmResourceSizeAvailable = mStmResourceTotalSize - mStmResourceSizeUsed; line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@316 PS2, Line 316: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@317 PS2, Line 317: } void function return statements are not generally useful
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@334 PS2, Line 334: if (NumEntries == 0) { braces {} are not necessary for any arm of this statement
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@341 PS2, Line 341: trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@341 PS2, Line 341: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@343 PS2, Line 343: if (Resource->Header.RscType == END_OF_RESOURCES) code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@343 PS2, Line 343: if (Resource->Header.RscType == END_OF_RESOURCES) please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@343 PS2, Line 343: if (Resource->Header.RscType == END_OF_RESOURCES) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@344 PS2, Line 344: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@345 PS2, Line 345: AddSingleResource (Resource); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@346 PS2, Line 346: Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length); line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@348 PS2, Line 348: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@349 PS2, Line 349: } void function return statements are not generally useful
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@357 PS2, Line 357: If 0, list must be terminated by END_OF_RESOURCES. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@372 PS2, Line 372: // END_OF_RESOURCES. trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@373 PS2, Line 373: // trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@374 PS2, Line 374: if (NumEntries == 0) { braces {} are not necessary for any arm of this statement
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@376 PS2, Line 376: } else { suspect code indent for conditional statements (8, 8)
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@382 PS2, Line 382: // trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@384 PS2, Line 384: trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@384 PS2, Line 384: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@386 PS2, Line 386: printk(BIOS_DEBUG, "ValidateResource (%llu) - RscType(%x)\n", Index, Resource->Header.RscType); line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@386 PS2, Line 386: printk(BIOS_DEBUG, "ValidateResource (%llu) - RscType(%x)\n", Index, Resource->Header.RscType); Prefer using '"%s...", __func__' to using 'ValidateResource', this function's name, in a string
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@388 PS2, Line 388: // Validate resource. trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@389 PS2, Line 389: // trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@392 PS2, Line 392: if (Resource->Header.Length != sizeof (STM_RSC_END)) space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@394 PS2, Line 394: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@395 PS2, Line 395: // If we are passed actual number of resources to add, code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@396 PS2, Line 396: // END_OF_RESOURCES structure between them is considered an code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@397 PS2, Line 397: // error. If NumEntries == 0 END_OF_RESOURCES is a termination. trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@397 PS2, Line 397: // error. If NumEntries == 0 END_OF_RESOURCES is a termination. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@398 PS2, Line 398: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@401 PS2, Line 401: } else { else is not generally useful after a break or return
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@402 PS2, Line 402: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@403 PS2, Line 403: // If NumEntries == 0 and list reached end - return success. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@404 PS2, Line 404: // trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@404 PS2, Line 404: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@411 PS2, Line 411: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@411 PS2, Line 411: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@417 PS2, Line 417: trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@417 PS2, Line 417: code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@417 PS2, Line 417: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@419 PS2, Line 419: case TRAPPED_IO_RANGE: trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@420 PS2, Line 420: if (Resource->Header.Length != sizeof (STM_RSC_IO_DESC)) space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@428 PS2, Line 428: printk(BIOS_DEBUG, "ValidateResource - PCI (0x%02x, 0x%08x, 0x%02x, 0x%02x)\n", Resource->PciCfg.OriginatingBusNumber, Resource->PciCfg.LastNodeIndex, Resource->PciCfg.PciDevicePath[0].PciDevice, Resource->PciCfg.PciDevicePath[0].PciFunction); line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@428 PS2, Line 428: printk(BIOS_DEBUG, "ValidateResource - PCI (0x%02x, 0x%08x, 0x%02x, 0x%02x)\n", Resource->PciCfg.OriginatingBusNumber, Resource->PciCfg.LastNodeIndex, Resource->PciCfg.PciDevicePath[0].PciDevice, Resource->PciCfg.PciDevicePath[0].PciFunction); Prefer using '"%s...", __func__' to using 'ValidateResource', this function's name, in a string
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@429 PS2, Line 429: if (Resource->Header.Length != sizeof (STM_RSC_PCI_CFG_DESC) + (sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex)) line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@429 PS2, Line 429: if (Resource->Header.Length != sizeof (STM_RSC_PCI_CFG_DESC) + (sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex)) space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@431 PS2, Line 431: for (SubIndex = 0; SubIndex <= Resource->PciCfg.LastNodeIndex; SubIndex++) { line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@432 PS2, Line 432: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) { line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@432 PS2, Line 432: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@436 PS2, Line 436: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@436 PS2, Line 436: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@436 PS2, Line 436: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@436 PS2, Line 436: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@436 PS2, Line 436: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@437 PS2, Line 437: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@437 PS2, Line 437: return false; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@437 PS2, Line 437: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@438 PS2, Line 438: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@438 PS2, Line 438: } please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@438 PS2, Line 438: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@439 PS2, Line 439: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@439 PS2, Line 439: break; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@439 PS2, Line 439: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@442 PS2, Line 442: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) { line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@442 PS2, Line 442: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@442 PS2, Line 442: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@446 PS2, Line 446: trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@446 PS2, Line 446: code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@446 PS2, Line 446: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@448 PS2, Line 448: printk(BIOS_DEBUG, "ValidateResource - Unknown RscType(%x)\n", Resource->Header.RscType); line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@448 PS2, Line 448: printk(BIOS_DEBUG, "ValidateResource - Unknown RscType(%x)\n", Resource->Header.RscType); Prefer using '"%s...", __func__' to using 'ValidateResource', this function's name, in a string
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@451 PS2, Line 451: Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length); line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@453 PS2, Line 453: return true; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@453 PS2, Line 453: return true; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@453 PS2, Line 453: return true; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@479 PS2, Line 479: // END_OF_RESOURCES. trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@480 PS2, Line 480: // trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@481 PS2, Line 481: if (NumEntries == 0) { braces {} are not necessary for any arm of this statement
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@482 PS2, Line 482: Count = 0xFFFFFFFF; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@482 PS2, Line 482: Count = 0xFFFFFFFF; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@482 PS2, Line 482: Count = 0xFFFFFFFF; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@489 PS2, Line 489: // trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@493 PS2, Line 493: if (Resource->Header.RscType == END_OF_RESOURCES) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@511 PS2, Line 511: @retval EFI_OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas. line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@521 PS2, Line 521: printk(BIOS_DEBUG, "AddPiResource - Enter\n"); Prefer using '"%s...", __func__' to using 'AddPiResource', this function's name, in a string
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@523 PS2, Line 523: if (!ValidateResource (ResourceList, NumEntries)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@523 PS2, Line 523: if (!ValidateResource (ResourceList, NumEntries)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@527 PS2, Line 527: ResourceSize = GetResourceSize (ResourceList, NumEntries); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@528 PS2, Line 528: printk (BIOS_DEBUG, "ResourceSize - 0x%08llx\n", ResourceSize); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@529 PS2, Line 529: if (ResourceSize == 0) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@535 PS2, Line 535: // Copy EndResource for intialization 'intialization' may be misspelled - perhaps 'initialization'?
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@544 PS2, Line 544: memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode)); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@546 PS2, Line 546: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode); line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@552 PS2, Line 552: } else if (mStmResourceSizeAvailable < ResourceSize) { suspect code indent for conditional statements (8, 8)
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@584 PS2, Line 584: // TBD code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@584 PS2, Line 584: // TBD please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@584 PS2, Line 584: // TBD please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@585 PS2, Line 585: //ASSERT (false); code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@585 PS2, Line 585: //ASSERT (false); please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@585 PS2, Line 585: //ASSERT (false); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@591 PS2, Line 591: memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode)); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@593 PS2, Line 593: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode); code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@593 PS2, Line 593: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode); please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@593 PS2, Line 593: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@604 PS2, Line 604: or the size of resource list to be filled if size of too small. line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@607 PS2, Line 607: @retval BUFFER_TOO_SMALL If resource list buffer is too small to hold the whole resources. line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@612 PS2, Line 612: if (*ResourceSize < mStmResourceSizeUsed) { suspect code indent for conditional statements (8, 8)
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@617 PS2, Line 617: memcpy (ResourceList, mStmResourcesPtr, mStmResourceSizeUsed); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@618 PS2, Line 618: *ResourceSize = (uint32_t)mStmResourceSizeUsed; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@618 PS2, Line 618: *ResourceSize = (uint32_t)mStmResourceSizeUsed; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@618 PS2, Line 618: *ResourceSize = (uint32_t)mStmResourceSizeUsed; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@619 PS2, Line 619: return 0;//EFI_SUCCESS; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@619 PS2, Line 619: return 0;//EFI_SUCCESS; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@619 PS2, Line 619: return 0;//EFI_SUCCESS; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@633 PS2, Line 633: MsrData64.msr = rdmsr (IA32_VMX_BASIC_MSR_INDEX); trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@633 PS2, Line 633: MsrData64.msr = rdmsr (IA32_VMX_BASIC_MSR_INDEX); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@637 PS2, Line 637: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport); line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@637 PS2, Line 637: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport); code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@637 PS2, Line 637: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@637 PS2, Line 637: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport); Prefer using '"%s...", __func__' to using 'GetVmcsSize', this function's name, in a string
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@642 PS2, Line 642: ThisVmcsSize = STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (ThisVmcsSize)); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@642 PS2, Line 642: ThisVmcsSize = STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (ThisVmcsSize)); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@657 PS2, Line 657: UINTN Index; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@657 PS2, Line 657: UINTN Index; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@657 PS2, Line 657: UINTN Index; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@661 PS2, Line 661: Pte = (uint32_t*)(uint32_t)PageTableBase; "(foo*)" should be "(foo *)"
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@664 PS2, Line 664: for (Index = 0; Index < SIZE_4KB / sizeof (*Pte); Index++) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@670 PS2, Line 670: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@671 PS2, Line 671: } void function return statements are not generally useful
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@689 PS2, Line 689: Pml4 = (uint64_t*)(uint32_t) PageTableBase; "(foo*)" should be "(foo *)"
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@693 PS2, Line 693: Pde = (uint64_t*)(uint32_t)PageTableBase; "(foo*)" should be "(foo *)"
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@702 PS2, Line 702: for (SubIndex = 0; SubIndex < SIZE_4KB / sizeof(*Pte); SubIndex++) { line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@703 PS2, Line 703: *Pte = (((Index << 9) + SubIndex) << 21) | IA32_PG_PS | IA32_PG_RW | IA32_PG_P; line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@708 PS2, Line 708: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@709 PS2, Line 709: } void function return statements are not generally useful
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@725 PS2, Line 725: STM_HEADER *StmHeader; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@732 PS2, Line 732: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) + line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@732 PS2, Line 732: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) + space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@732 PS2, Line 732: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) + space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@734 PS2, Line 734: (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count); line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@734 PS2, Line 734: (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@735 PS2, Line 735: if (MinMsegSize < StmImageSize) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@739 PS2, Line 739: if (StmHeader->HwStmHdr.Cr3Offset >= StmHeader->SwStmHdr.StaticImageSize) { line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@743 PS2, Line 743: if (MinMsegSize < StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6)) { line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@743 PS2, Line 743: if (MinMsegSize < StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@744 PS2, Line 744: MinMsegSize = StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6); line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@751 PS2, Line 751: if (MinMsegSize > CONFIG_MSEG_SIZE) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@781 PS2, Line 781: //memcpy ((void *)(uint32_t)MsegBase, (void *)(uint32_t)StmImage, StmImageSize); line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@785 PS2, Line 785: if (sizeof(UINTN) == sizeof(uint64_t)) { braces {} are not necessary for any arm of this statement
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@786 PS2, Line 786: StmGen4GPageTableX64 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset); line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@786 PS2, Line 786: StmGen4GPageTableX64 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@788 PS2, Line 788: StmGen4GPageTableIa32 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset); line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@788 PS2, Line 788: StmGen4GPageTableIa32 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@804 PS2, Line 804: @retval EFI_BUFFER_TOO_SMALL MSEG is smaller than minimal requirement of STM image line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@814 PS2, Line 814: if (SmmMonCtlMsr.bits.MsegAddress == 0) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@822 PS2, Line 822: if (!StmCheckStmImage (StmImage, StmImageSize)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@822 PS2, Line 822: if (!StmCheckStmImage (StmImage, StmImageSize)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@827 PS2, Line 827: // Record STM_HASH to PCR 0, just in case it is NOT TXT launch, we still need provide the evidence. line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@833 PS2, Line 833: (void *)StmImage, // HashData code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@833 PS2, Line 833: (void *)StmImage, // HashData please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@833 PS2, Line 833: (void *)StmImage, // HashData please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@837 PS2, Line 837: StmLoadStmImage (StmImage, StmImageSize); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@838 PS2, Line 838: trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@838 PS2, Line 838: code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/SmmStm.c@838 PS2, Line 838: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h File src/security/intel/stm/StmApi.h:
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@155 PS2, Line 155: uint64_t AcpiRsdp; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@155 PS2, Line 155: uint64_t AcpiRsdp; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@155 PS2, Line 155: uint64_t AcpiRsdp; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@156 PS2, Line 156: uint8_t PhysicalAddressBits; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@156 PS2, Line 156: uint8_t PhysicalAddressBits; please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@156 PS2, Line 156: uint8_t PhysicalAddressBits; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@247 PS2, Line 247: uint32_t Cr4; // fe40h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@247 PS2, Line 247: uint32_t Cr4; // fe40h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@247 PS2, Line 247: uint32_t Cr4; // fe40h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@253 PS2, Line 253: uint32_t IdtLimit; // fe98h : NO trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@258 PS2, Line 258: uint32_t LdtInfo; // fea4h : NO trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@266 PS2, Line 266: uint32_t SMMRevId; // fefch : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@266 PS2, Line 266: uint32_t SMMRevId; // fefch : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@266 PS2, Line 266: uint32_t SMMRevId; // fefch : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@505 PS2, Line 505: //#define DOMAIN_INTEGRITY_PROT_OUT (DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN) line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@507 PS2, Line 507: //#define DOMAIN_FULLY_PROT_IN (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_OUT) line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@508 PS2, Line 508: //#define DOMAIN_FULLY_PROT_OUT (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN) line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@509 PS2, Line 509: #define DOMAIN_FULLY_PROT (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN | DOMAIN_DISALLOWED_IO_OUT) line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmApi.h@751 PS2, Line 751: #pragma pack (pop) space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmPlatformRe... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmPlatformRe... PS2, Line 143: // Index Read Write trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmPlatformRe... PS2, Line 167: //mTsegSize = (uint32_t)(~((uint32_t)rdmsr(SMRR_PHYSMASK_MSR) & 0xFFFFF000) + 1); line over 80 characters
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmPlatformRe... PS2, Line 206: trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmPlatformRe... PS2, Line 206: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmPlatformRe... PS2, Line 240: trailing whitespace
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmPlatformRe... PS2, Line 240: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmPlatformSm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmPlatformSm... PS2, Line 61: StmGen4GPageTableX64 ((uint32_t)MsegBase + space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmPlatformSm... PS2, Line 79: struct descriptor{ missing space after struct definition
https://review.coreboot.org/#/c/33234/2/src/security/intel/stm/StmPlatformSm... PS2, Line 87: void ReadGdtr( struct descriptor *gdtr) space prohibited after that open parenthesis '('
Hello Christian Walter, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#3).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D Myers cedarhouse1@comcast.net --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,226 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/3
Name of user not set #1002358 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 3:
(2 comments)
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/Kconfig File src/security/intel/stm/Kconfig:
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/Kconfig@7 PS1, Line 7: depends on (PLATFORM_USES_FSP2_0||PLATFORM_USES_FSP1_1||PLATFORM_USES_FSP1_0)
the FSP depends were suggested (on the original change that is split in this submission) by Philipp […]
Done
https://review.coreboot.org/#/c/33234/1/src/security/intel/stm/Kconfig@12 PS1, Line 12: hex "mseg size"
generally 1MB should suffice for a STM only application and 3MB+ depending upon the size of the VM/P […]
Done
Name of user not set #1002358 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 3:
Patch Set 3:
(2 comments)
Hello Christian Walter, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#4).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D Myers cedarhouse1@comcast.net --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,226 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/4
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 4:
(262 comments)
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@178 PS4, Line 178: ResourceHi = (uint64_t) Resource->Io.Base + code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@178 PS4, Line 178: ResourceHi = (uint64_t) Resource->Io.Base + please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@178 PS4, Line 178: ResourceHi = (uint64_t) Resource->Io.Base + please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@181 PS4, Line 181: RecordHi = (uint64_t) Record->Io.Base + code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@181 PS4, Line 181: RecordHi = (uint64_t) Record->Io.Base + please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@181 PS4, Line 181: RecordHi = (uint64_t) Record->Io.Base + please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@185 PS4, Line 185: if ((Resource->PciCfg.OriginatingBusNumber != suspect code indent for conditional statements (16, 32)
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@188 PS4, Line 188: Record->PciCfg.LastNodeIndex)) trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@190 PS4, Line 190: trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@191 PS4, Line 191: if (memcmp (Resource->PciCfg.PciDevicePath, suspect code indent for conditional statements (16, 32)
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@191 PS4, Line 191: if (memcmp (Resource->PciCfg.PciDevicePath, space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@201 PS4, Line 201: RecordHi = (uint64_t) Record->PciCfg.Base + trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@218 PS4, Line 218: // Special case - merge MSR masks in place. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@218 PS4, Line 218: // Special case - merge MSR masks in place. please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@218 PS4, Line 218: // Special case - merge MSR masks in place. please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@219 PS4, Line 219: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@219 PS4, Line 219: // please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@219 PS4, Line 219: // please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@222 PS4, Line 222: Record->Msr.ReadMask |= Resource->Msr.ReadMask; trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@223 PS4, Line 223: Record->Msr.WriteMask |= Resource->Msr.WriteMask; trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@232 PS4, Line 232: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@232 PS4, Line 232: return false; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@232 PS4, Line 232: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@236 PS4, Line 236: // trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@240 PS4, Line 240: // Resources are overlapping. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@240 PS4, Line 240: // Resources are overlapping. please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@240 PS4, Line 240: // Resources are overlapping. please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@241 PS4, Line 241: // Resource and record are merged. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@241 PS4, Line 241: // Resource and record are merged. please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@241 PS4, Line 241: // Resource and record are merged. please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@242 PS4, Line 242: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@242 PS4, Line 242: // please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@242 PS4, Line 242: // please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@246 PS4, Line 246: switch (Resource->Header.RscType) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@246 PS4, Line 246: switch (Resource->Header.RscType) { please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@246 PS4, Line 246: switch (Resource->Header.RscType) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@251 PS4, Line 251: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@251 PS4, Line 251: break; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@251 PS4, Line 251: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@254 PS4, Line 254: Record->Io.Base = (uint64_t) ResourceLo; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@254 PS4, Line 254: Record->Io.Base = (uint64_t) ResourceLo; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@254 PS4, Line 254: Record->Io.Base = (uint64_t) ResourceLo; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@255 PS4, Line 255: Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo); code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@255 PS4, Line 255: Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo); please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@255 PS4, Line 255: Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@256 PS4, Line 256: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@256 PS4, Line 256: break; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@256 PS4, Line 256: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@260 PS4, Line 260: break; trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@262 PS4, Line 262: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@262 PS4, Line 262: return false; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@262 PS4, Line 262: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@288 PS4, Line 288: Record = (STM_RSC *)((void *)Record + Record->Header.Length); line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@289 PS4, Line 289: continue; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@289 PS4, Line 289: continue; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@289 PS4, Line 289: continue; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@294 PS4, Line 294: if (HandleSingleResource (Resource, Record)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@294 PS4, Line 294: if (HandleSingleResource (Resource, Record)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@295 PS4, Line 295: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@296 PS4, Line 296: } trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@296 PS4, Line 296: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@296 PS4, Line 296: } please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@296 PS4, Line 296: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@303 PS4, Line 303: memcpy ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@308 PS4, Line 308: memcpy ( space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@309 PS4, Line 309: mStmResourcesPtr + mStmResourceSizeUsed - sizeof(mRscEndNode) + Resource->Header.Length, line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@314 PS4, Line 314: mStmResourceSizeAvailable = mStmResourceTotalSize - mStmResourceSizeUsed; line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@316 PS4, Line 316: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@317 PS4, Line 317: } void function return statements are not generally useful
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@334 PS4, Line 334: if (NumEntries == 0) { braces {} are not necessary for any arm of this statement
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@341 PS4, Line 341: trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@341 PS4, Line 341: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@343 PS4, Line 343: if (Resource->Header.RscType == END_OF_RESOURCES) code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@343 PS4, Line 343: if (Resource->Header.RscType == END_OF_RESOURCES) please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@343 PS4, Line 343: if (Resource->Header.RscType == END_OF_RESOURCES) please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@344 PS4, Line 344: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@345 PS4, Line 345: AddSingleResource (Resource); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@346 PS4, Line 346: Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length); line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@348 PS4, Line 348: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@349 PS4, Line 349: } void function return statements are not generally useful
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@357 PS4, Line 357: If 0, list must be terminated by END_OF_RESOURCES. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@372 PS4, Line 372: // END_OF_RESOURCES. trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@373 PS4, Line 373: // trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@374 PS4, Line 374: if (NumEntries == 0) { braces {} are not necessary for any arm of this statement
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@376 PS4, Line 376: } else { suspect code indent for conditional statements (8, 8)
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@382 PS4, Line 382: // trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@384 PS4, Line 384: trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@384 PS4, Line 384: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@386 PS4, Line 386: printk(BIOS_DEBUG, "ValidateResource (%llu) - RscType(%x)\n", Index, Resource->Header.RscType); line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@386 PS4, Line 386: printk(BIOS_DEBUG, "ValidateResource (%llu) - RscType(%x)\n", Index, Resource->Header.RscType); Prefer using '"%s...", __func__' to using 'ValidateResource', this function's name, in a string
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@388 PS4, Line 388: // Validate resource. trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@389 PS4, Line 389: // trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@392 PS4, Line 392: if (Resource->Header.Length != sizeof (STM_RSC_END)) space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@394 PS4, Line 394: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@395 PS4, Line 395: // If we are passed actual number of resources to add, code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@396 PS4, Line 396: // END_OF_RESOURCES structure between them is considered an code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@397 PS4, Line 397: // error. If NumEntries == 0 END_OF_RESOURCES is a termination. trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@397 PS4, Line 397: // error. If NumEntries == 0 END_OF_RESOURCES is a termination. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@398 PS4, Line 398: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@401 PS4, Line 401: } else { else is not generally useful after a break or return
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@402 PS4, Line 402: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@403 PS4, Line 403: // If NumEntries == 0 and list reached end - return success. code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@404 PS4, Line 404: // trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@404 PS4, Line 404: // code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@411 PS4, Line 411: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@411 PS4, Line 411: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@417 PS4, Line 417: trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@417 PS4, Line 417: code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@417 PS4, Line 417: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@419 PS4, Line 419: case TRAPPED_IO_RANGE: trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@420 PS4, Line 420: if (Resource->Header.Length != sizeof (STM_RSC_IO_DESC)) space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@428 PS4, Line 428: printk(BIOS_DEBUG, "ValidateResource - PCI (0x%02x, 0x%08x, 0x%02x, 0x%02x)\n", Resource->PciCfg.OriginatingBusNumber, Resource->PciCfg.LastNodeIndex, Resource->PciCfg.PciDevicePath[0].PciDevice, Resource->PciCfg.PciDevicePath[0].PciFunction); line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@428 PS4, Line 428: printk(BIOS_DEBUG, "ValidateResource - PCI (0x%02x, 0x%08x, 0x%02x, 0x%02x)\n", Resource->PciCfg.OriginatingBusNumber, Resource->PciCfg.LastNodeIndex, Resource->PciCfg.PciDevicePath[0].PciDevice, Resource->PciCfg.PciDevicePath[0].PciFunction); Prefer using '"%s...", __func__' to using 'ValidateResource', this function's name, in a string
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@429 PS4, Line 429: if (Resource->Header.Length != sizeof (STM_RSC_PCI_CFG_DESC) + (sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex)) line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@429 PS4, Line 429: if (Resource->Header.Length != sizeof (STM_RSC_PCI_CFG_DESC) + (sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex)) space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@431 PS4, Line 431: for (SubIndex = 0; SubIndex <= Resource->PciCfg.LastNodeIndex; SubIndex++) { line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@432 PS4, Line 432: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) { line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@432 PS4, Line 432: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@436 PS4, Line 436: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@436 PS4, Line 436: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@436 PS4, Line 436: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@436 PS4, Line 436: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@436 PS4, Line 436: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@437 PS4, Line 437: return false; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@437 PS4, Line 437: return false; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@437 PS4, Line 437: return false; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@438 PS4, Line 438: } code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@438 PS4, Line 438: } please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@438 PS4, Line 438: } please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@439 PS4, Line 439: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@439 PS4, Line 439: break; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@439 PS4, Line 439: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@442 PS4, Line 442: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) { line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@442 PS4, Line 442: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@442 PS4, Line 442: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@446 PS4, Line 446: trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@446 PS4, Line 446: code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@446 PS4, Line 446: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@448 PS4, Line 448: printk(BIOS_DEBUG, "ValidateResource - Unknown RscType(%x)\n", Resource->Header.RscType); line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@448 PS4, Line 448: printk(BIOS_DEBUG, "ValidateResource - Unknown RscType(%x)\n", Resource->Header.RscType); Prefer using '"%s...", __func__' to using 'ValidateResource', this function's name, in a string
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@451 PS4, Line 451: Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length); line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@453 PS4, Line 453: return true; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@453 PS4, Line 453: return true; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@453 PS4, Line 453: return true; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@479 PS4, Line 479: // END_OF_RESOURCES. trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@480 PS4, Line 480: // trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@481 PS4, Line 481: if (NumEntries == 0) { braces {} are not necessary for any arm of this statement
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@482 PS4, Line 482: Count = 0xFFFFFFFF; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@482 PS4, Line 482: Count = 0xFFFFFFFF; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@482 PS4, Line 482: Count = 0xFFFFFFFF; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@489 PS4, Line 489: // trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@493 PS4, Line 493: if (Resource->Header.RscType == END_OF_RESOURCES) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@511 PS4, Line 511: @retval EFI_OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas. line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@521 PS4, Line 521: printk(BIOS_DEBUG, "AddPiResource - Enter\n"); Prefer using '"%s...", __func__' to using 'AddPiResource', this function's name, in a string
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@523 PS4, Line 523: if (!ValidateResource (ResourceList, NumEntries)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@523 PS4, Line 523: if (!ValidateResource (ResourceList, NumEntries)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@527 PS4, Line 527: ResourceSize = GetResourceSize (ResourceList, NumEntries); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@528 PS4, Line 528: printk (BIOS_DEBUG, "ResourceSize - 0x%08llx\n", ResourceSize); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@529 PS4, Line 529: if (ResourceSize == 0) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@535 PS4, Line 535: // Copy EndResource for intialization 'intialization' may be misspelled - perhaps 'initialization'?
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@544 PS4, Line 544: memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode)); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@546 PS4, Line 546: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode); line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@552 PS4, Line 552: } else if (mStmResourceSizeAvailable < ResourceSize) { suspect code indent for conditional statements (8, 8)
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@584 PS4, Line 584: // TBD code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@584 PS4, Line 584: // TBD please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@584 PS4, Line 584: // TBD please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@585 PS4, Line 585: //ASSERT (false); code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@585 PS4, Line 585: //ASSERT (false); please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@585 PS4, Line 585: //ASSERT (false); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@591 PS4, Line 591: memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode)); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@593 PS4, Line 593: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode); code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@593 PS4, Line 593: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode); please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@593 PS4, Line 593: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@604 PS4, Line 604: or the size of resource list to be filled if size of too small. line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@607 PS4, Line 607: @retval BUFFER_TOO_SMALL If resource list buffer is too small to hold the whole resources. line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@612 PS4, Line 612: if (*ResourceSize < mStmResourceSizeUsed) { suspect code indent for conditional statements (8, 8)
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@617 PS4, Line 617: memcpy (ResourceList, mStmResourcesPtr, mStmResourceSizeUsed); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@618 PS4, Line 618: *ResourceSize = (uint32_t)mStmResourceSizeUsed; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@618 PS4, Line 618: *ResourceSize = (uint32_t)mStmResourceSizeUsed; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@618 PS4, Line 618: *ResourceSize = (uint32_t)mStmResourceSizeUsed; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@619 PS4, Line 619: return 0;//EFI_SUCCESS; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@619 PS4, Line 619: return 0;//EFI_SUCCESS; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@619 PS4, Line 619: return 0;//EFI_SUCCESS; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@633 PS4, Line 633: MsrData64.msr = rdmsr (IA32_VMX_BASIC_MSR_INDEX); trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@633 PS4, Line 633: MsrData64.msr = rdmsr (IA32_VMX_BASIC_MSR_INDEX); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@637 PS4, Line 637: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport); line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@637 PS4, Line 637: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport); code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@637 PS4, Line 637: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport); please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@637 PS4, Line 637: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport); Prefer using '"%s...", __func__' to using 'GetVmcsSize', this function's name, in a string
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@642 PS4, Line 642: ThisVmcsSize = STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (ThisVmcsSize)); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@642 PS4, Line 642: ThisVmcsSize = STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (ThisVmcsSize)); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@657 PS4, Line 657: UINTN Index; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@657 PS4, Line 657: UINTN Index; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@657 PS4, Line 657: UINTN Index; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@661 PS4, Line 661: Pte = (uint32_t*)(uint32_t)PageTableBase; "(foo*)" should be "(foo *)"
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@664 PS4, Line 664: for (Index = 0; Index < SIZE_4KB / sizeof (*Pte); Index++) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@670 PS4, Line 670: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@671 PS4, Line 671: } void function return statements are not generally useful
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@689 PS4, Line 689: Pml4 = (uint64_t*)(uint32_t) PageTableBase; "(foo*)" should be "(foo *)"
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@693 PS4, Line 693: Pde = (uint64_t*)(uint32_t)PageTableBase; "(foo*)" should be "(foo *)"
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@702 PS4, Line 702: for (SubIndex = 0; SubIndex < SIZE_4KB / sizeof(*Pte); SubIndex++) { line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@703 PS4, Line 703: *Pte = (((Index << 9) + SubIndex) << 21) | IA32_PG_PS | IA32_PG_RW | IA32_PG_P; line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@708 PS4, Line 708: return ; space prohibited before semicolon
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@709 PS4, Line 709: } void function return statements are not generally useful
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@725 PS4, Line 725: STM_HEADER *StmHeader; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@732 PS4, Line 732: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) + line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@732 PS4, Line 732: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) + space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@732 PS4, Line 732: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) + space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@734 PS4, Line 734: (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count); line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@734 PS4, Line 734: (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@735 PS4, Line 735: if (MinMsegSize < StmImageSize) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@739 PS4, Line 739: if (StmHeader->HwStmHdr.Cr3Offset >= StmHeader->SwStmHdr.StaticImageSize) { line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@743 PS4, Line 743: if (MinMsegSize < StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6)) { line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@743 PS4, Line 743: if (MinMsegSize < StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@744 PS4, Line 744: MinMsegSize = StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6); line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@751 PS4, Line 751: if (MinMsegSize > CONFIG_MSEG_SIZE) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@781 PS4, Line 781: //memcpy ((void *)(uint32_t)MsegBase, (void *)(uint32_t)StmImage, StmImageSize); line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@785 PS4, Line 785: if (sizeof(UINTN) == sizeof(uint64_t)) { braces {} are not necessary for any arm of this statement
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@786 PS4, Line 786: StmGen4GPageTableX64 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset); line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@786 PS4, Line 786: StmGen4GPageTableX64 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@788 PS4, Line 788: StmGen4GPageTableIa32 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset); line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@788 PS4, Line 788: StmGen4GPageTableIa32 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@804 PS4, Line 804: @retval EFI_BUFFER_TOO_SMALL MSEG is smaller than minimal requirement of STM image line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@814 PS4, Line 814: if (SmmMonCtlMsr.bits.MsegAddress == 0) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@822 PS4, Line 822: if (!StmCheckStmImage (StmImage, StmImageSize)) { space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@822 PS4, Line 822: if (!StmCheckStmImage (StmImage, StmImageSize)) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@827 PS4, Line 827: // Record STM_HASH to PCR 0, just in case it is NOT TXT launch, we still need provide the evidence. line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@833 PS4, Line 833: (void *)StmImage, // HashData code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@833 PS4, Line 833: (void *)StmImage, // HashData please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@833 PS4, Line 833: (void *)StmImage, // HashData please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@837 PS4, Line 837: StmLoadStmImage (StmImage, StmImageSize); space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@838 PS4, Line 838: trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@838 PS4, Line 838: code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@838 PS4, Line 838: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h File src/security/intel/stm/StmApi.h:
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@155 PS4, Line 155: uint64_t AcpiRsdp; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@155 PS4, Line 155: uint64_t AcpiRsdp; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@155 PS4, Line 155: uint64_t AcpiRsdp; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@156 PS4, Line 156: uint8_t PhysicalAddressBits; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@156 PS4, Line 156: uint8_t PhysicalAddressBits; please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@156 PS4, Line 156: uint8_t PhysicalAddressBits; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@247 PS4, Line 247: uint32_t Cr4; // fe40h : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@247 PS4, Line 247: uint32_t Cr4; // fe40h : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@247 PS4, Line 247: uint32_t Cr4; // fe40h : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@253 PS4, Line 253: uint32_t IdtLimit; // fe98h : NO trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@258 PS4, Line 258: uint32_t LdtInfo; // fea4h : NO trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@266 PS4, Line 266: uint32_t SMMRevId; // fefch : NO code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@266 PS4, Line 266: uint32_t SMMRevId; // fefch : NO please, no space before tabs
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@266 PS4, Line 266: uint32_t SMMRevId; // fefch : NO please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@505 PS4, Line 505: //#define DOMAIN_INTEGRITY_PROT_OUT (DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN) line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@507 PS4, Line 507: //#define DOMAIN_FULLY_PROT_IN (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_OUT) line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@508 PS4, Line 508: //#define DOMAIN_FULLY_PROT_OUT (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN) line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@509 PS4, Line 509: #define DOMAIN_FULLY_PROT (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN | DOMAIN_DISALLOWED_IO_OUT) line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@751 PS4, Line 751: #pragma pack (pop) space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformRe... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformRe... PS4, Line 143: // Index Read Write trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformRe... PS4, Line 167: //mTsegSize = (uint32_t)(~((uint32_t)rdmsr(SMRR_PHYSMASK_MSR) & 0xFFFFF000) + 1); line over 80 characters
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformRe... PS4, Line 206: trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformRe... PS4, Line 206: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformRe... PS4, Line 240: trailing whitespace
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformRe... PS4, Line 240: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformSm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformSm... PS4, Line 61: StmGen4GPageTableX64 ((uint32_t)MsegBase + space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformSm... PS4, Line 79: struct descriptor{ missing space after struct definition
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformSm... PS4, Line 87: void ReadGdtr( struct descriptor *gdtr) space prohibited after that open parenthesis '('
Hello Christian Walter, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#5).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D Myers cedarhouse1@comcast.net --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,238 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/5
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 5:
(20 comments)
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@256 PS5, Line 256: break; code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@256 PS5, Line 256: break; please, no space before tabs
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@256 PS5, Line 256: break; please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@340 PS5, Line 340: trailing whitespace
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@340 PS5, Line 340: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@389 PS5, Line 389: switch(Resource->Header.RscType) { space required before the open parenthesis '('
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@391 PS5, Line 391: if (Resource->Header.Length != sizeof (STM_RSC_END)) space prohibited between function name and open parenthesis '('
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@402 PS5, Line 402: // trailing whitespace
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@416 PS5, Line 416: trailing whitespace
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@416 PS5, Line 416: please, no spaces at the start of a line
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@432 PS5, Line 432: Resource->PciCfg.PciDevicePath[0].PciDevice, line over 80 characters
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@433 PS5, Line 433: Resource->PciCfg.PciDevicePath[0].PciFunction); line over 80 characters
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@434 PS5, Line 434: if (Resource->Header.Length != trailing whitespace
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@442 PS5, Line 442: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > line over 80 characters
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@444 PS5, Line 444: (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > line over 80 characters
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@747 PS5, Line 747: MinMsegSize = (STM_PAGES_TO_SIZE(STM_SIZE_TO_PAGES(StmHeader->SwStmHdr.StaticImageSize)) line over 80 characters
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@749 PS5, Line 749: + (StmHeader->SwStmHdr.PerProcDynamicMemorySize trailing whitespace
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@846 PS5, Line 846: (void *)StmImage, // HashData code indent should use tabs where possible
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@846 PS5, Line 846: (void *)StmImage, // HashData please, no space before tabs
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@846 PS5, Line 846: (void *)StmImage, // HashData please, no spaces at the start of a line
Name of user not set #1002358 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 5:
(250 comments)
Patch Set 3:
Patch Set 3:
(2 comments)
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@178 PS4, Line 178: ResourceHi = (uint64_t) Resource->Io.Base +
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@178 PS4, Line 178: ResourceHi = (uint64_t) Resource->Io.Base +
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@178 PS4, Line 178: ResourceHi = (uint64_t) Resource->Io.Base +
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@181 PS4, Line 181: RecordHi = (uint64_t) Record->Io.Base +
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@181 PS4, Line 181: RecordHi = (uint64_t) Record->Io.Base +
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@181 PS4, Line 181: RecordHi = (uint64_t) Record->Io.Base +
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@188 PS4, Line 188: Record->PciCfg.LastNodeIndex))
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@190 PS4, Line 190:
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@191 PS4, Line 191: if (memcmp (Resource->PciCfg.PciDevicePath,
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@191 PS4, Line 191: if (memcmp (Resource->PciCfg.PciDevicePath,
suspect code indent for conditional statements (16, 32)
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@201 PS4, Line 201: RecordHi = (uint64_t) Record->PciCfg.Base +
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@218 PS4, Line 218: // Special case - merge MSR masks in place.
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@218 PS4, Line 218: // Special case - merge MSR masks in place.
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@218 PS4, Line 218: // Special case - merge MSR masks in place.
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@219 PS4, Line 219: //
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@219 PS4, Line 219: //
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@219 PS4, Line 219: //
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@222 PS4, Line 222: Record->Msr.ReadMask |= Resource->Msr.ReadMask;
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@223 PS4, Line 223: Record->Msr.WriteMask |= Resource->Msr.WriteMask;
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@232 PS4, Line 232: return false;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@232 PS4, Line 232: return false;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@232 PS4, Line 232: return false;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@236 PS4, Line 236: //
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@240 PS4, Line 240: // Resources are overlapping.
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@240 PS4, Line 240: // Resources are overlapping.
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@240 PS4, Line 240: // Resources are overlapping.
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@241 PS4, Line 241: // Resource and record are merged.
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@241 PS4, Line 241: // Resource and record are merged.
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@241 PS4, Line 241: // Resource and record are merged.
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@242 PS4, Line 242: //
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@242 PS4, Line 242: //
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@242 PS4, Line 242: //
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@246 PS4, Line 246: switch (Resource->Header.RscType) {
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@246 PS4, Line 246: switch (Resource->Header.RscType) {
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@246 PS4, Line 246: switch (Resource->Header.RscType) {
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@251 PS4, Line 251: break;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@251 PS4, Line 251: break;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@251 PS4, Line 251: break;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@254 PS4, Line 254: Record->Io.Base = (uint64_t) ResourceLo;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@254 PS4, Line 254: Record->Io.Base = (uint64_t) ResourceLo;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@254 PS4, Line 254: Record->Io.Base = (uint64_t) ResourceLo;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@255 PS4, Line 255: Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo);
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@255 PS4, Line 255: Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo);
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@255 PS4, Line 255: Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo);
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@256 PS4, Line 256: break;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@256 PS4, Line 256: break;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@256 PS4, Line 256: break;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@260 PS4, Line 260: break;
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@262 PS4, Line 262: return false;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@262 PS4, Line 262: return false;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@262 PS4, Line 262: return false;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@288 PS4, Line 288: Record = (STM_RSC *)((void *)Record + Record->Header.Length);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@289 PS4, Line 289: continue;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@289 PS4, Line 289: continue;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@289 PS4, Line 289: continue;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@294 PS4, Line 294: if (HandleSingleResource (Resource, Record)) {
braces {} are not necessary for single statement blocks
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@294 PS4, Line 294: if (HandleSingleResource (Resource, Record)) {
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@296 PS4, Line 296: }
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@296 PS4, Line 296: }
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@296 PS4, Line 296: }
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@296 PS4, Line 296: }
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@303 PS4, Line 303: memcpy (
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@308 PS4, Line 308: memcpy (
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@309 PS4, Line 309: mStmResourcesPtr + mStmResourceSizeUsed - sizeof(mRscEndNode) + Resource->Header.Length,
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@314 PS4, Line 314: mStmResourceSizeAvailable = mStmResourceTotalSize - mStmResourceSizeUsed;
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@316 PS4, Line 316: return ;
space prohibited before semicolon
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@317 PS4, Line 317: }
void function return statements are not generally useful
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@334 PS4, Line 334: if (NumEntries == 0) {
braces {} are not necessary for any arm of this statement
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@341 PS4, Line 341:
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@341 PS4, Line 341:
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@343 PS4, Line 343: if (Resource->Header.RscType == END_OF_RESOURCES)
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@343 PS4, Line 343: if (Resource->Header.RscType == END_OF_RESOURCES)
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@343 PS4, Line 343: if (Resource->Header.RscType == END_OF_RESOURCES)
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@344 PS4, Line 344: return ;
space prohibited before semicolon
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@345 PS4, Line 345: AddSingleResource (Resource);
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@346 PS4, Line 346: Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@348 PS4, Line 348: return ;
space prohibited before semicolon
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@349 PS4, Line 349: }
void function return statements are not generally useful
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@357 PS4, Line 357: If 0, list must be terminated by END_OF_RESOURCES.
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@372 PS4, Line 372: // END_OF_RESOURCES.
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@373 PS4, Line 373: //
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@374 PS4, Line 374: if (NumEntries == 0) {
braces {} are not necessary for any arm of this statement
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@376 PS4, Line 376: } else {
suspect code indent for conditional statements (8, 8)
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@382 PS4, Line 382: //
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@384 PS4, Line 384:
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@384 PS4, Line 384:
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@386 PS4, Line 386: printk(BIOS_DEBUG, "ValidateResource (%llu) - RscType(%x)\n", Index, Resource->Header.RscType);
Prefer using '"%s... […]
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@386 PS4, Line 386: printk(BIOS_DEBUG, "ValidateResource (%llu) - RscType(%x)\n", Index, Resource->Header.RscType);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@388 PS4, Line 388: // Validate resource.
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@389 PS4, Line 389: //
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@392 PS4, Line 392: if (Resource->Header.Length != sizeof (STM_RSC_END))
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@394 PS4, Line 394: //
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@395 PS4, Line 395: // If we are passed actual number of resources to add,
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@396 PS4, Line 396: // END_OF_RESOURCES structure between them is considered an
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@397 PS4, Line 397: // error. If NumEntries == 0 END_OF_RESOURCES is a termination.
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@397 PS4, Line 397: // error. If NumEntries == 0 END_OF_RESOURCES is a termination.
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@398 PS4, Line 398: //
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@401 PS4, Line 401: } else {
else is not generally useful after a break or return
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@402 PS4, Line 402: //
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@403 PS4, Line 403: // If NumEntries == 0 and list reached end - return success.
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@404 PS4, Line 404: //
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@404 PS4, Line 404: //
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@411 PS4, Line 411: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC))
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@411 PS4, Line 411: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC))
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@417 PS4, Line 417:
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@417 PS4, Line 417:
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@417 PS4, Line 417:
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@419 PS4, Line 419: case TRAPPED_IO_RANGE:
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@428 PS4, Line 428: printk(BIOS_DEBUG, "ValidateResource - PCI (0x%02x, 0x%08x, 0x%02x, 0x%02x)\n", Resource->PciCfg.OriginatingBusNumber, Resource->PciCfg.LastNodeIndex, Resource->PciCfg.PciDevicePath[0].PciDevice, Resource->PciCfg.PciDevicePath[0].PciFunction);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@428 PS4, Line 428: printk(BIOS_DEBUG, "ValidateResource - PCI (0x%02x, 0x%08x, 0x%02x, 0x%02x)\n", Resource->PciCfg.OriginatingBusNumber, Resource->PciCfg.LastNodeIndex, Resource->PciCfg.PciDevicePath[0].PciDevice, Resource->PciCfg.PciDevicePath[0].PciFunction);
Prefer using '"%s... […]
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@429 PS4, Line 429: if (Resource->Header.Length != sizeof (STM_RSC_PCI_CFG_DESC) + (sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex))
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@429 PS4, Line 429: if (Resource->Header.Length != sizeof (STM_RSC_PCI_CFG_DESC) + (sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex))
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@431 PS4, Line 431: for (SubIndex = 0; SubIndex <= Resource->PciCfg.LastNodeIndex; SubIndex++) {
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@432 PS4, Line 432: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) {
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@432 PS4, Line 432: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) {
braces {} are not necessary for single statement blocks
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@436 PS4, Line 436: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) {
braces {} are not necessary for single statement blocks
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@436 PS4, Line 436: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) {
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@436 PS4, Line 436: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) {
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@436 PS4, Line 436: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) {
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@437 PS4, Line 437: return false;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@437 PS4, Line 437: return false;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@437 PS4, Line 437: return false;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@438 PS4, Line 438: }
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@438 PS4, Line 438: }
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@438 PS4, Line 438: }
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@442 PS4, Line 442: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) {
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@442 PS4, Line 442: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) {
braces {} are not necessary for single statement blocks
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@442 PS4, Line 442: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) {
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@446 PS4, Line 446:
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@446 PS4, Line 446:
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@446 PS4, Line 446:
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@448 PS4, Line 448: printk(BIOS_DEBUG, "ValidateResource - Unknown RscType(%x)\n", Resource->Header.RscType);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@448 PS4, Line 448: printk(BIOS_DEBUG, "ValidateResource - Unknown RscType(%x)\n", Resource->Header.RscType);
Prefer using '"%s... […]
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@451 PS4, Line 451: Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@453 PS4, Line 453: return true;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@453 PS4, Line 453: return true;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@453 PS4, Line 453: return true;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@479 PS4, Line 479: // END_OF_RESOURCES.
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@480 PS4, Line 480: //
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@481 PS4, Line 481: if (NumEntries == 0) {
braces {} are not necessary for any arm of this statement
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@482 PS4, Line 482: Count = 0xFFFFFFFF;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@482 PS4, Line 482: Count = 0xFFFFFFFF;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@482 PS4, Line 482: Count = 0xFFFFFFFF;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@489 PS4, Line 489: //
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@493 PS4, Line 493: if (Resource->Header.RscType == END_OF_RESOURCES) {
braces {} are not necessary for single statement blocks
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@511 PS4, Line 511: @retval EFI_OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas.
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@523 PS4, Line 523: if (!ValidateResource (ResourceList, NumEntries)) {
braces {} are not necessary for single statement blocks
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@523 PS4, Line 523: if (!ValidateResource (ResourceList, NumEntries)) {
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@527 PS4, Line 527: ResourceSize = GetResourceSize (ResourceList, NumEntries);
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@528 PS4, Line 528: printk (BIOS_DEBUG, "ResourceSize - 0x%08llx\n", ResourceSize);
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@529 PS4, Line 529: if (ResourceSize == 0) {
braces {} are not necessary for single statement blocks
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@535 PS4, Line 535: // Copy EndResource for intialization
'intialization' may be misspelled - perhaps 'initialization'?
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@544 PS4, Line 544: memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode));
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@546 PS4, Line 546: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@552 PS4, Line 552: } else if (mStmResourceSizeAvailable < ResourceSize) {
suspect code indent for conditional statements (8, 8)
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@584 PS4, Line 584: // TBD
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@584 PS4, Line 584: // TBD
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@584 PS4, Line 584: // TBD
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@585 PS4, Line 585: //ASSERT (false);
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@585 PS4, Line 585: //ASSERT (false);
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@585 PS4, Line 585: //ASSERT (false);
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@591 PS4, Line 591: memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode));
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@593 PS4, Line 593: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode);
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@593 PS4, Line 593: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode);
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@593 PS4, Line 593: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode);
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@604 PS4, Line 604: or the size of resource list to be filled if size of too small.
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@607 PS4, Line 607: @retval BUFFER_TOO_SMALL If resource list buffer is too small to hold the whole resources.
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@612 PS4, Line 612: if (*ResourceSize < mStmResourceSizeUsed) {
suspect code indent for conditional statements (8, 8)
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@617 PS4, Line 617: memcpy (ResourceList, mStmResourcesPtr, mStmResourceSizeUsed);
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@618 PS4, Line 618: *ResourceSize = (uint32_t)mStmResourceSizeUsed;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@618 PS4, Line 618: *ResourceSize = (uint32_t)mStmResourceSizeUsed;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@618 PS4, Line 618: *ResourceSize = (uint32_t)mStmResourceSizeUsed;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@619 PS4, Line 619: return 0;//EFI_SUCCESS;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@619 PS4, Line 619: return 0;//EFI_SUCCESS;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@619 PS4, Line 619: return 0;//EFI_SUCCESS;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@633 PS4, Line 633: MsrData64.msr = rdmsr (IA32_VMX_BASIC_MSR_INDEX);
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@633 PS4, Line 633: MsrData64.msr = rdmsr (IA32_VMX_BASIC_MSR_INDEX);
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@637 PS4, Line 637: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@637 PS4, Line 637: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport);
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@637 PS4, Line 637: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport);
Prefer using '"%s... […]
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@637 PS4, Line 637: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport);
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@642 PS4, Line 642: ThisVmcsSize = STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (ThisVmcsSize));
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@642 PS4, Line 642: ThisVmcsSize = STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (ThisVmcsSize));
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@657 PS4, Line 657: UINTN Index;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@657 PS4, Line 657: UINTN Index;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@657 PS4, Line 657: UINTN Index;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@661 PS4, Line 661: Pte = (uint32_t*)(uint32_t)PageTableBase;
"(foo*)" should be "(foo *)"
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@664 PS4, Line 664: for (Index = 0; Index < SIZE_4KB / sizeof (*Pte); Index++) {
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@670 PS4, Line 670: return ;
space prohibited before semicolon
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@671 PS4, Line 671: }
void function return statements are not generally useful
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@689 PS4, Line 689: Pml4 = (uint64_t*)(uint32_t) PageTableBase;
"(foo*)" should be "(foo *)"
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@693 PS4, Line 693: Pde = (uint64_t*)(uint32_t)PageTableBase;
"(foo*)" should be "(foo *)"
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@702 PS4, Line 702: for (SubIndex = 0; SubIndex < SIZE_4KB / sizeof(*Pte); SubIndex++) {
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@703 PS4, Line 703: *Pte = (((Index << 9) + SubIndex) << 21) | IA32_PG_PS | IA32_PG_RW | IA32_PG_P;
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@708 PS4, Line 708: return ;
space prohibited before semicolon
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@709 PS4, Line 709: }
void function return statements are not generally useful
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@725 PS4, Line 725: STM_HEADER *StmHeader;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@732 PS4, Line 732: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) +
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@732 PS4, Line 732: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) +
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@732 PS4, Line 732: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) +
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@734 PS4, Line 734: (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@734 PS4, Line 734: (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count);
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@735 PS4, Line 735: if (MinMsegSize < StmImageSize) {
braces {} are not necessary for single statement blocks
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@739 PS4, Line 739: if (StmHeader->HwStmHdr.Cr3Offset >= StmHeader->SwStmHdr.StaticImageSize) {
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@743 PS4, Line 743: if (MinMsegSize < StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6)) {
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@743 PS4, Line 743: if (MinMsegSize < StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6)) {
braces {} are not necessary for single statement blocks
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@744 PS4, Line 744: MinMsegSize = StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@781 PS4, Line 781: //memcpy ((void *)(uint32_t)MsegBase, (void *)(uint32_t)StmImage, StmImageSize);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@785 PS4, Line 785: if (sizeof(UINTN) == sizeof(uint64_t)) {
braces {} are not necessary for any arm of this statement
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@786 PS4, Line 786: StmGen4GPageTableX64 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset);
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@786 PS4, Line 786: StmGen4GPageTableX64 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@788 PS4, Line 788: StmGen4GPageTableIa32 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset);
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@788 PS4, Line 788: StmGen4GPageTableIa32 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@804 PS4, Line 804: @retval EFI_BUFFER_TOO_SMALL MSEG is smaller than minimal requirement of STM image
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@814 PS4, Line 814: if (SmmMonCtlMsr.bits.MsegAddress == 0) {
braces {} are not necessary for single statement blocks
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@822 PS4, Line 822: if (!StmCheckStmImage (StmImage, StmImageSize)) {
braces {} are not necessary for single statement blocks
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@822 PS4, Line 822: if (!StmCheckStmImage (StmImage, StmImageSize)) {
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@833 PS4, Line 833: (void *)StmImage, // HashData
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@833 PS4, Line 833: (void *)StmImage, // HashData
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@833 PS4, Line 833: (void *)StmImage, // HashData
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@837 PS4, Line 837: StmLoadStmImage (StmImage, StmImageSize);
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@838 PS4, Line 838:
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@838 PS4, Line 838:
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/SmmStm.c@838 PS4, Line 838:
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h File src/security/intel/stm/StmApi.h:
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@155 PS4, Line 155: uint64_t AcpiRsdp;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@155 PS4, Line 155: uint64_t AcpiRsdp;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@155 PS4, Line 155: uint64_t AcpiRsdp;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@156 PS4, Line 156: uint8_t PhysicalAddressBits;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@156 PS4, Line 156: uint8_t PhysicalAddressBits;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@156 PS4, Line 156: uint8_t PhysicalAddressBits;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@247 PS4, Line 247: uint32_t Cr4; // fe40h : NO
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@247 PS4, Line 247: uint32_t Cr4; // fe40h : NO
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@247 PS4, Line 247: uint32_t Cr4; // fe40h : NO
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@253 PS4, Line 253: uint32_t IdtLimit; // fe98h : NO
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@258 PS4, Line 258: uint32_t LdtInfo; // fea4h : NO
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@266 PS4, Line 266: uint32_t SMMRevId; // fefch : NO
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@266 PS4, Line 266: uint32_t SMMRevId; // fefch : NO
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@266 PS4, Line 266: uint32_t SMMRevId; // fefch : NO
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@505 PS4, Line 505: //#define DOMAIN_INTEGRITY_PROT_OUT (DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN)
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@507 PS4, Line 507: //#define DOMAIN_FULLY_PROT_IN (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_OUT)
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@508 PS4, Line 508: //#define DOMAIN_FULLY_PROT_OUT (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN)
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmApi.h@509 PS4, Line 509: #define DOMAIN_FULLY_PROT (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN | DOMAIN_DISALLOWED_IO_OUT)
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformRe... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformRe... PS4, Line 143: // Index Read Write
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformRe... PS4, Line 167: //mTsegSize = (uint32_t)(~((uint32_t)rdmsr(SMRR_PHYSMASK_MSR) & 0xFFFFF000) + 1);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformRe... PS4, Line 206:
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformRe... PS4, Line 206:
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformRe... PS4, Line 240:
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformRe... PS4, Line 240:
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformSm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformSm... PS4, Line 61: StmGen4GPageTableX64 ((uint32_t)MsegBase +
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/#/c/33234/4/src/security/intel/stm/StmPlatformSm... PS4, Line 79: struct descriptor{
missing space after struct definition
Done
Hello Christian Walter, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#6).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D Myers cedarhouse1@comcast.net --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,239 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/6
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 6:
(6 comments)
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@439 PS6, Line 439: for (SubIndex = 0; suspect code indent for conditional statements (24, 24)
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@442 PS6, Line 442: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > line over 80 characters
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@442 PS6, Line 442: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > suspect code indent for conditional statements (24, 40)
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@444 PS6, Line 444: (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > line over 80 characters
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@748 PS6, Line 748: (STM_PAGES_TO_SIZE(STM_SIZE_TO_PAGES(StmHeader->SwStmHdr.StaticImageSize)) line over 80 characters
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@750 PS6, Line 750: + (StmHeader->SwStmHdr.PerProcDynamicMemorySize trailing whitespace
Name of user not set #1002358 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 6:
(17 comments)
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@256 PS5, Line 256: break;
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@256 PS5, Line 256: break;
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@256 PS5, Line 256: break;
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@340 PS5, Line 340:
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@340 PS5, Line 340:
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@433 PS5, Line 433: Resource->PciCfg.PciDevicePath[0].PciFunction);
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@434 PS5, Line 434: if (Resource->Header.Length !=
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@442 PS5, Line 442: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice >
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@444 PS5, Line 444: (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction >
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@747 PS5, Line 747: MinMsegSize = (STM_PAGES_TO_SIZE(STM_SIZE_TO_PAGES(StmHeader->SwStmHdr.StaticImageSize))
line over 80 characters
Done
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@749 PS5, Line 749: + (StmHeader->SwStmHdr.PerProcDynamicMemorySize
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@846 PS5, Line 846: (void *)StmImage, // HashData
code indent should use tabs where possible
Done
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@846 PS5, Line 846: (void *)StmImage, // HashData
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/5/src/security/intel/stm/SmmStm.c@846 PS5, Line 846: (void *)StmImage, // HashData
please, no spaces at the start of a line
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@442 PS6, Line 442: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice >
line over 80 characters
How does one deal with statements that really cannot be split
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@444 PS6, Line 444: (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction >
line over 80 characters
How does one deal with statements that cannot be split
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@748 PS6, Line 748: (STM_PAGES_TO_SIZE(STM_SIZE_TO_PAGES(StmHeader->SwStmHdr.StaticImageSize))
line over 80 characters
How does one deal with statements that really cannot be split
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 6:
(8 comments)
Please don't use camel case for filenames, variables, function names and structs. applies to all files and all commits.
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@369 PS6, Line 369: // whitespace at begging of line applies to all files, all commits
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@442 PS6, Line 442: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice >
How does one deal with statements that really cannot be split
try to use functions if the indentation is too much
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@791 PS6, Line 791: uint32_t uintptr_t
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformRe... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformRe... PS6, Line 38: void FixupPciexResource(void); looks like those can be made static. in that case there's no need to define a function prototype
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformRe... PS6, Line 186: //RscPcieMmio.Base = PcdGet64 (PcdPciExpressBaseAddress); CONFIG_MMCONF_BASE_ADDRESS on some platforms: CONFIG_SA_PCIEX_LENGTH
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformSm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformSm... PS6, Line 53: printk(BIOS_DEBUG, "STM loaded into mseg: 0x%08x size: %u\n", %p
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformSm... PS6, Line 54: (uint32_t) MsegBase, StmImageSize); remove case
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformSm... PS6, Line 87: void ReadGdtr(struct descriptor *gdtr) static
Name of user not set #1002358 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 6:
(17 comments)
Will post an update once I am finish dealing with the CamelCase. Not until the middle of next week.
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@369 PS6, Line 369: //
whitespace at begging of line […]
I assume that you mean that all comments are to be left justified. Coding style and the bot were not clear on that issue. Will mode all files to comply.
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@439 PS6, Line 439: for (SubIndex = 0;
suspect code indent for conditional statements (24, 24)
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@442 PS6, Line 442: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice >
try to use functions if the indentation is too much
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@442 PS6, Line 442: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice >
Done
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@442 PS6, Line 442: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice >
suspect code indent for conditional statements (24, 40)
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@442 PS6, Line 442: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice >
Done
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@444 PS6, Line 444: (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction >
How does one deal with statements that cannot be split
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@748 PS6, Line 748: (STM_PAGES_TO_SIZE(STM_SIZE_TO_PAGES(StmHeader->SwStmHdr.StaticImageSize))
How does one deal with statements that really cannot be split
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@750 PS6, Line 750: + (StmHeader->SwStmHdr.PerProcDynamicMemorySize
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@750 PS6, Line 750: + (StmHeader->SwStmHdr.PerProcDynamicMemorySize
Done
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@750 PS6, Line 750: + (StmHeader->SwStmHdr.PerProcDynamicMemorySize
Done
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@791 PS6, Line 791: uint32_t
uintptr_t
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformRe... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformRe... PS6, Line 38: void FixupPciexResource(void);
looks like those can be made static. […]
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformRe... PS6, Line 186: //RscPcieMmio.Base = PcdGet64 (PcdPciExpressBaseAddress);
CONFIG_MMCONF_BASE_ADDRESS […]
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformSm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformSm... PS6, Line 53: printk(BIOS_DEBUG, "STM loaded into mseg: 0x%08x size: %u\n",
%p
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformSm... PS6, Line 54: (uint32_t) MsegBase, StmImageSize);
remove case
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformSm... PS6, Line 87: void ReadGdtr(struct descriptor *gdtr)
static
Done
Philipp Deppenwiese has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@842 PS6, Line 842: TpmMeasureAndLogData( if CONFIG(TPM1) || CONFIG(TPM2) {}
src/security/tpm/tspi.h: uint32_t tpm_measure_region(const struct region_device *rdev, uint8_t pcr, const char *rname);
We don't use the UEFI TCPA log stuff here. It's just completely broken. See https://doc.coreboot.org/security/vboot/measured_boot.html?highlight=measure...
Philipp Deppenwiese has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformSm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformSm... PS6, Line 51: StmImageSize = cbfs_boot_load_file("stm.bin", MsegBase, StmBufferSize, Maybe do measurements here
Philipp Deppenwiese has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@842 PS6, Line 842: TpmMeasureAndLogData(
if CONFIG(TPM1) || CONFIG(TPM2) {} […]
Totally forgot. If vboot is enabled measurements are done automatically. if ((CONFIG(TPM1) || CONFIG(TPM2)) && ! CONFIG(VBOOT)) {}
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@369 PS6, Line 369: //
I assume that you mean that all comments are to be left justified. […]
You usually use tabs instead of space. Also C style comments are preferred over C++. See https://doc.coreboot.org/coding_style.html
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 6:
From coding style: "You may use C99-style “// …” comments."
I don't see a need to change the comment style in this CL.
Comment style evolves and // are allowed.
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 6:
(6 comments)
My comments here are mostly nits. The one big item I noticed is use of typedef on struct. coreboot a long time ago moved to the linux kernel convention of avoiding typedefs for structs. I'm wondering what others think here -- let this go in and fix it later, or fix it now, or just leave it?
you can find the long argument here: https://yarchive.net/comp/linux/typedefs.html
Note that I don't necessarily agree. The folks who invented C and the Unix kernel, when they got to Plan 9 in the 1980s, used typedef structs *exactly* the way torvalds claims you should not use them. I tend to take ken and dmr's words more than I take Linus', but not everyone does.
Overall, I think this is one of the most exciting things to go into coreboot in many years. I'm looking forward to being able to use it. This code holds out the promise of providing a VM for x86 that gives guests true bare metal performance (unless I misunderstand). Thanks for your contribution and (in advance) your patience with our review process.
I do suggest you at least give clang-fmt a try and see how many of your code formatting issues it resolves.
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/Makefile.inc File src/security/intel/stm/Makefile.inc:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/Makefile.inc@... PS6, Line 2: # put the stm where is can be found where *it*
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/Makefile.inc@... PS6, Line 4: cbfs-files-y += stm.bin the convention here would be to replace -y with $(CONFIG_STM) so I'm wondering why you did not do that? Is there some other thing I'm missing?
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.h File src/security/intel/stm/SmmStm.h:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.h@20 PS6, Line 20: #define IA32_VMX_BASIC_MSR_INDEX 0x480 is there any reason not to just put these in src/include/cpu/x86/msr.h
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@27 PS6, Line 27: #define RDWR_ACCS 3 It would be much better if we could get most of these constants in a generic place. They are not really STM. But if you can commit to making those changes later I'm ok with it.
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@369 PS6, Line 369: //
You usually use tabs instead of space. Also C style comments are preferred over C++. […]
if you're willing to do a clang-fmt pass and check the output that would save some work?
If you want you can get rid of the lines that have only a //. They're not that helpful IMHO.
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@548 PS6, Line 548: //mStmResourcesPtr = (uint8_t *)(UINTN)NewResource; if you have commented code there are better options, since one day it may be uncommented for some reason and won't compile. Consider if (0) {...} for code you want to leave here for some reason but not run. Or, just remove the commented code.
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/Kconfig File src/security/intel/stm/Kconfig:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/Kconfig@5 PS6, Line 5: bool "Enable STM" Please give more details here, what STM is, and why it should be enabled.
Werner Zeh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 6:
There is a bunch of camel-case in your code. We usually write the code in small letters only.
Name of user not set #1002358 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 6:
(12 comments)
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@369 PS6, Line 369: //
if you're willing to do a clang-fmt pass and check the output that would save some work? […]
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@439 PS6, Line 439: for (SubIndex = 0;
Done
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@442 PS6, Line 442: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice >
Done
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@442 PS6, Line 442: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice >
Done
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@442 PS6, Line 442: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice >
Done
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@444 PS6, Line 444: (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction >
Done
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@548 PS6, Line 548: //mStmResourcesPtr = (uint8_t *)(UINTN)NewResource;
if you have commented code there are better options, since one day it may be uncommented for some re […]
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@748 PS6, Line 748: (STM_PAGES_TO_SIZE(STM_SIZE_TO_PAGES(StmHeader->SwStmHdr.StaticImageSize))
Done
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@750 PS6, Line 750: + (StmHeader->SwStmHdr.PerProcDynamicMemorySize
Done
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@750 PS6, Line 750: + (StmHeader->SwStmHdr.PerProcDynamicMemorySize
Done
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@791 PS6, Line 791: uint32_t
Done
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@842 PS6, Line 842: TpmMeasureAndLogData(
Totally forgot. If vboot is enabled measurements are done automatically. […]
It seems that vboot would not know to measure the STM since it is a blob and that it would be loaded at run time. For a D-RTM (or TXT) boot, the STM is measured during the D-RTM phase and SINIT provides the STM measurement along with the MLE. This is intended to replace that during a non-D-RTM boot.
Name of user not set #1002358 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 6:
(6 comments)
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/Kconfig File src/security/intel/stm/Kconfig:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/Kconfig@5 PS6, Line 5: bool "Enable STM"
Please give more details here, what STM is, and why it should be enabled.
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/Makefile.inc File src/security/intel/stm/Makefile.inc:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/Makefile.inc@... PS6, Line 2: # put the stm where is can be found
where *it*
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/Makefile.inc@... PS6, Line 4: cbfs-files-y += stm.bin
the convention here would be to replace -y with $(CONFIG_STM) so I'm wondering why you did not do th […]
no, just still figuring this out.
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.h File src/security/intel/stm/SmmStm.h:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.h@20 PS6, Line 20: #define IA32_VMX_BASIC_MSR_INDEX 0x480
is there any reason not to just put these in src/include/cpu/x86/msr. […]
Done
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/SmmStm.c@27 PS6, Line 27: #define RDWR_ACCS 3
It would be much better if we could get most of these constants in a generic place. […]
Agreed. Some of these could be merged with the TXT support as the STM does utilize the TXT registers when available. Others, like the IA32_PG_*, I am not so sure about since they are related to page tables and a quick scan of the source didn't turn up anything related.
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformSm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/#/c/33234/6/src/security/intel/stm/StmPlatformSm... PS6, Line 51: StmImageSize = cbfs_boot_load_file("stm.bin", MsegBase, StmBufferSize,
Maybe do measurements here
Done
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#7).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 1,967 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/7
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 7:
(5 comments)
https://review.coreboot.org/#/c/33234/7/src/security/intel/stm/Kconfig File src/security/intel/stm/Kconfig:
https://review.coreboot.org/#/c/33234/7/src/security/intel/stm/Kconfig@19 PS7, Line 19: observation and interference. Examples of usage include kernel trailing whitespace
https://review.coreboot.org/#/c/33234/7/src/security/intel/stm/Kconfig@21 PS7, Line 21: trailing whitespace
https://review.coreboot.org/#/c/33234/7/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/7/src/security/intel/stm/SmmStm.c@361 PS7, Line 361: break; break is not useful after a goto or return
https://review.coreboot.org/#/c/33234/7/src/security/intel/stm/SmmStm.c@435 PS7, Line 435: * If 0, list must be terminated by END_OF_RESOURCES. please, no space before tabs
https://review.coreboot.org/#/c/33234/7/src/security/intel/stm/SmmStm.c@472 PS7, Line 472: * If 0, list must be terminated by END_OF_RESOURCES. please, no space before tabs
Name of user not set #1002358 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 7:
(5 comments)
https://review.coreboot.org/#/c/33234/7/src/security/intel/stm/Kconfig File src/security/intel/stm/Kconfig:
https://review.coreboot.org/#/c/33234/7/src/security/intel/stm/Kconfig@19 PS7, Line 19: observation and interference. Examples of usage include kernel
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/7/src/security/intel/stm/Kconfig@21 PS7, Line 21:
trailing whitespace
Done
https://review.coreboot.org/#/c/33234/7/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/7/src/security/intel/stm/SmmStm.c@361 PS7, Line 361: break;
break is not useful after a goto or return
Done
https://review.coreboot.org/#/c/33234/7/src/security/intel/stm/SmmStm.c@472 PS7, Line 472: * If 0, list must be terminated by END_OF_RESOURCES.
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/7/src/security/intel/stm/SmmStm.c@472 PS7, Line 472: * If 0, list must be terminated by END_OF_RESOURCES.
Done
Done
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#8).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 1,967 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/8
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 8:
(2 comments)
https://review.coreboot.org/#/c/33234/8/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/8/src/security/intel/stm/SmmStm.c@434 PS8, Line 434: * If 0, list must be terminated by END_OF_RESOURCES. please, no space before tabs
https://review.coreboot.org/#/c/33234/8/src/security/intel/stm/SmmStm.c@471 PS8, Line 471: * If 0, list must be terminated by END_OF_RESOURCES. line over 80 characters
Name of user not set #1002358 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 8:
(2 comments)
https://review.coreboot.org/#/c/33234/8/src/security/intel/stm/SmmStm.c File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/#/c/33234/8/src/security/intel/stm/SmmStm.c@434 PS8, Line 434: * If 0, list must be terminated by END_OF_RESOURCES.
please, no space before tabs
Done
https://review.coreboot.org/#/c/33234/8/src/security/intel/stm/SmmStm.c@471 PS8, Line 471: * If 0, list must be terminated by END_OF_RESOURCES.
line over 80 characters
Done
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#9).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 1,967 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/9
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#10).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 1,964 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/10
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#11).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 1,964 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/11
Name of user not set #1002358 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 11:
(4 comments)
https://review.coreboot.org/c/coreboot/+/33234/1/src/security/intel/stm/StmP... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/c/coreboot/+/33234/1/src/security/intel/stm/StmP... PS1, Line 180: // Find max bus number and PCIEX length
Done
Done
https://review.coreboot.org/c/coreboot/+/33234/1/src/security/intel/stm/StmP... PS1, Line 180: // Find max bus number and PCIEX length
This is part of the code that is generating the access list for the SMI handler. […]
Done
https://review.coreboot.org/c/coreboot/+/33234/1/src/security/intel/stm/StmP... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/c/coreboot/+/33234/1/src/security/intel/stm/StmP... PS1, Line 27: extern bool StmCheckStmImage(void *StmImage, uint32_t StmImageSize);
will be in updated changes
Done
https://review.coreboot.org/c/coreboot/+/33234/1/src/security/intel/stm/StmP... PS1, Line 38: int LoadStmImage(uint32_t mseg)
done - in next change update
Done
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#12).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,065 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/12
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 12:
(22 comments)
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.h:
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Smm... PS12, Line 31: uintptr_t mseg, int cpu, int num_cpus, uintptr_t smbase, trailing whitespace
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Smm... PS12, Line 106: uint8_t * stm_resource_heap = NULL; "foo * bar" should be "foo *bar"
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Smm... PS12, Line 343: __func__, trailing whitespace
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Smm... PS12, Line 345: resource->header.rsc_type, code indent should use tabs where possible
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Smm... PS12, Line 345: resource->header.rsc_type, please, no space before tabs
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 46: {{MEM_RANGE, sizeof(STM_RSC_MEM_DESC)}, that open brace { should be on the previous line
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 73: static STM_RSC_END rsc_list_end __attribute__((used)) = trailing whitespace
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 74: {{END_OF_RESOURCES, sizeof(STM_RSC_END)}, 0}; that open brace { should be on the previous line
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 167: Status = add_pi_resource((void *)&rsc_pm_io, 1); trailing whitespace
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 106: void * smbase_processor; "foo * bar" should be "foo *bar"
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 110: trailing whitespace
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 117: trailing whitespace
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 120: printk(BIOS_DEBUG, trailing whitespace
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 148: // smbase and not the one for the smi handler in tseg. So we have trailing whitespace
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 150: trailing whitespace
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 159: smbase, psd); code indent should use tabs where possible
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 159: smbase, psd); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 162: extern uint8_t * stm_resource_heap; "foo * bar" should be "foo *bar"
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 166: void stm_setup(uintptr_t mseg, int cpu, int num_cpus, uintptr_t smbase, trailing whitespace
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 174: if(cpu == 0) that open brace { should be on the previous line
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 174: if(cpu == 0) space required before the open parenthesis '('
https://review.coreboot.org/c/coreboot/+/33234/12/src/security/intel/stm/Stm... PS12, Line 179: trailing whitespace
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#13).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,065 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/13
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 13:
(2 comments)
https://review.coreboot.org/c/coreboot/+/33234/13/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/c/coreboot/+/33234/13/src/security/intel/stm/Smm... PS13, Line 106: uint8_t * stm_resource_heap = NULL; "foo * bar" should be "foo *bar"
https://review.coreboot.org/c/coreboot/+/33234/13/src/security/intel/stm/Smm... PS13, Line 343: __func__, trailing whitespace
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#14).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,065 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/14
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#15).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,065 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/15
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#20).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,074 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/20
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 21:
(7 comments)
So if you can address these comments, and we can work out why this won't build, we can get this in soon I hope.
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.h:
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Smm... PS21, Line 43: * @retval OUT_OF_RESOURCES If nested procedure returned it and we cannot I think you need a space here.
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Smm... PS21, Line 77: * This function notify STM resource change. Notify and STM resource change
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Smm... PS21, Line 84: * This function return BIOS STM resource. Get a BIOS STM resource
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Smm... PS21, Line 295: UINTN index; it would be nice to use uintptr_t instead of UINTN. I realize Intel likes it but ... uintptr_t is a bit more standard.
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Stm... File src/security/intel/stm/StmApi.h:
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Stm... PS21, Line 26: typedef uint64_t UINTN; oh boy. We have 22 different typedefs of UINTN in the coreboot tree today. In some code Intel makes this a uintptr_t, and here it looks like it's a uint64_t. Could we just replace all uses of UINTN with uint64_t in the STM code so people don't have to dig around? Otherwise it gets confusing.
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Stm... PS21, Line 60: uint32_t stm_smm_rev_id[1]; BY this did they mean an array of one uint32_t or an indeterminate length array? If the latter this is a pre-gcc 3.0 usage. If the former, why an array?
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Stm... PS21, Line 83: uint64_t image_page_base[1]; //[NumberOfPages]; why 1 ...
Name of user not set #1002358 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 21:
(7 comments)
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.h:
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Smm... PS21, Line 43: * @retval OUT_OF_RESOURCES If nested procedure returned it and we cannot
I think you need a space here.
added space
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Smm... PS21, Line 77: * This function notify STM resource change.
Notify and STM resource change
done
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Smm... PS21, Line 84: * This function return BIOS STM resource.
Get a BIOS STM resource
Changed to: "returns the pointer to the STM BIOS resource list"
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Smm... PS21, Line 295: UINTN index;
it would be nice to use uintptr_t instead of UINTN. I realize Intel likes it but ... […]
changed to uint32_t, scanned the other modules and changed UINTN to the appropriate type
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Stm... File src/security/intel/stm/StmApi.h:
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Stm... PS21, Line 26: typedef uint64_t UINTN;
oh boy. We have 22 different typedefs of UINTN in the coreboot tree today. […]
Since I changed all the UINTN's, this typedef has been removed
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Stm... PS21, Line 60: uint32_t stm_smm_rev_id[1];
BY this did they mean an array of one uint32_t or an indeterminate length array? If the latter this […]
Indeterminate length array where the length is determined by the "num_of_rev_ids" field.
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Stm... PS21, Line 83: uint64_t image_page_base[1]; //[NumberOfPages];
why 1 ...
In the STM spec, the image_page_base can be multiple entries. In this implementation, only a single page is supported.
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#22).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/security/Kconfig M src/security/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,072 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/22
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 22:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Stm... File src/security/intel/stm/StmApi.h:
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Stm... PS21, Line 60: uint32_t stm_smm_rev_id[1];
Indeterminate length array where the length is determined by the "num_of_rev_ids" field.
So I'm pretty sure this should be https://en.wikipedia.org/wiki/Flexible_array_member uint32_t stm_smm_rev_id[];
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#23).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,071 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/23
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 23:
(3 comments)
https://review.coreboot.org/c/coreboot/+/33234/23/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.h:
https://review.coreboot.org/c/coreboot/+/33234/23/src/security/intel/stm/Smm... PS23, Line 42: * @retval INVALID_PARAMETER If nested procedure detected resource failer 'failer' may be misspelled - perhaps 'failure'?
https://review.coreboot.org/c/coreboot/+/33234/23/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/c/coreboot/+/33234/23/src/security/intel/stm/Smm... PS23, Line 482: * @retval INVALID_PARAMETER If nested procedure detected resource failer 'failer' may be misspelled - perhaps 'failure'?
https://review.coreboot.org/c/coreboot/+/33234/23/src/security/intel/stm/Smm... PS23, Line 535: * @retval INVALID_PARAMETER If nested procedure detected resource failer 'failer' may be misspelled - perhaps 'failure'?
Name of user not set #1002358 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 23:
(4 comments)
https://review.coreboot.org/c/coreboot/+/33234/23/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.h:
https://review.coreboot.org/c/coreboot/+/33234/23/src/security/intel/stm/Smm... PS23, Line 42: * @retval INVALID_PARAMETER If nested procedure detected resource failer
'failer' may be misspelled - perhaps 'failure'?
Done
https://review.coreboot.org/c/coreboot/+/33234/23/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/c/coreboot/+/33234/23/src/security/intel/stm/Smm... PS23, Line 482: * @retval INVALID_PARAMETER If nested procedure detected resource failer
'failer' may be misspelled - perhaps 'failure'?
Done
https://review.coreboot.org/c/coreboot/+/33234/23/src/security/intel/stm/Smm... PS23, Line 535: * @retval INVALID_PARAMETER If nested procedure detected resource failer
'failer' may be misspelled - perhaps 'failure'?
Done
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Stm... File src/security/intel/stm/StmApi.h:
https://review.coreboot.org/c/coreboot/+/33234/21/src/security/intel/stm/Stm... PS21, Line 60: uint32_t stm_smm_rev_id[1];
So I'm pretty sure this should be […]
In this case here we are depending on the [1] to define the array size correct and code that is dependent on this being so.
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#24).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,071 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/24
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#26).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 10 files changed, 2,071 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/26
Hello Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#29).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches. They were combined because cross-dependencies required that they be comitted concurrently
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 15 files changed, 2,142 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/29
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 29:
Werner any chance you could check this one? It's now one CL.
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 29:
(10 comments)
I had a few nits, nothing big.
https://review.coreboot.org/c/coreboot/+/33234/29/src/cpu/x86/mp_init.c File src/cpu/x86/mp_init.c:
https://review.coreboot.org/c/coreboot/+/33234/29/src/cpu/x86/mp_init.c@819 PS29, Line 819: uint32_t mseg; I bet some compiler at some point is going to complain that this is unused when CONFIG(STM) is not true.
Could you just move the use of it to the if (CONFIG(STM)) block at 837.
https://review.coreboot.org/c/coreboot/+/33234/29/src/cpu/x86/mp_init.c@1055 PS29, Line 1055: state->smm_save_state_size += Does line 1055 recreate line 1045 without the guard? I'm a bit confused here. Also, did you want the smm_save_state_size aligned up to the next 0x1000 granularity or just add the TXT_PROCESSOR_SMM_DESCRIPTOR rounded up to 0x1000?
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... PS29, Line 122: uint64_t resource_lo; I guess this is intel code we should change as little as possible, but I'm puzzled they didn't just initialize these variables to 0 in the declaration instead of these additional lines of assignment. Oh well.
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... PS29, Line 144: != record->mem.rwx_attributes) { This code may provide better justification for very long lines than I could ever make myself :-)
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... PS29, Line 540: // ASSERT (false); I assume the ASSERT comes with Intel's code? Thanks for changing that. Intels' theory on BIOSes is that they should brick your machine if they get unhappy, which I"ve never understood.
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... PS29, Line 623: * Create 4G page table for STM. I just got lost. I see them setting PG_PS below. It looks like an array of 4M or 2M PTEs below.
So maybe this comment is Create a 4G page table for STM with 2M PTEs (x86_64) or 4M PTEs (x86_32)?
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... PS29, Line 637: pagetable_base += SIZE_4KB; I have to say, the SIZE_4KB constant here is not that helpful to me ... it obscures meaning. I'd almost rather just see 4096 or PTPSize, i.e. page table page size. I guess there's not much to do for it.
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... File src/security/intel/stm/StmApi.h:
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 44: uint32_t intel_64mode_supported : 1; // bitfield I think you can drop the bitfield comments; if people reading this don't know that already they don't know C ... Also, you could name the variable reserved to mbz, which is a pretty well known convention? Your call on that one.
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 226: uint32_t gdt_base_hi_dword; // fdd0h : NO what does NO mean here?
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 338: #define END_OF_RESOURCES 0 so sometimes we have enum and sometimes define, I was wondering if there is a reason.
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 29: Code-Review-1
(12 comments)
- Previous comments made on the unquashed patche series still apply - please add a config so Jenkins actually builds the STM code - additional comments would be great to understand why it's done
https://review.coreboot.org/c/coreboot/+/33234/29//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/33234/29//COMMIT_MSG@9 PS29, Line 9: combination It can be done without breaking anything.
https://review.coreboot.org/c/coreboot/+/33234/29//COMMIT_MSG@16 PS29, Line 16: resource Why does it create a resource list? Where is it stored? What spec was used to write the code?
https://review.coreboot.org/c/coreboot/+/33234/29//COMMIT_MSG@16 PS29, Line 16: tables Where reside the page tables? What mapping is used? Identity mapping? Why does it use paging?
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Kco... File src/security/intel/stm/Kconfig:
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Kco... PS29, Line 5: default Some Intel platforms are missing, why?
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Kco... PS29, Line 6: (PLATFORM_USES_FSP2_0||PLATFORM_USES_FSP1_1||PLATFORM_USES_FSP1_0) FSP1_0 support was dropped. Shouldn't this depend on the presence of TSEG?
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... PS29, Line 483: retval Never returned
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 113: ACPI_BASE_ADDRESS Platform specific code doesn't belong here
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 116: attribute__((weak)) No need for weak
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 126: 255 Depends on the mmconf size
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 157: Fix-up What's fixed?
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 32: retval No true, returns only a single retval
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 81: mem_region_device_ro_init(&stm_region No commented code
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 29:
Patch Set 29: Code-Review-1
(12 comments)
- Previous comments made on the unquashed patche series still apply
- please add a config so Jenkins actually builds the STM code
Is there any documentation or examples on how this config file is constructed and where to place it?
- additional comments would be great to understand why it's done
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#30).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page table to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 15 files changed, 2,136 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/30
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 30:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33234/30/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/c/coreboot/+/33234/30/src/security/intel/stm/Stm... PS30, Line 76: if (CONFIG(TPM1) || CONFIG(TPM2)) { braces {} are not necessary for single statement blocks
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#31).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page table to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 15 files changed, 2,136 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/31
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 31:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33234/31/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/c/coreboot/+/33234/31/src/security/intel/stm/Stm... PS31, Line 76: if (CONFIG(TPM1) || CONFIG(TPM2)) { braces {} are not necessary for single statement blocks
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#32).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page table to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 15 files changed, 2,130 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/32
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#33).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page table to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 15 files changed, 2,130 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/33
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 33:
(22 comments)
To do: Still need to know how to create a config to get Jenkins to build STM Code
https://review.coreboot.org/c/coreboot/+/33234/29//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/33234/29//COMMIT_MSG@9 PS29, Line 9: combination
It can be done without breaking anything.
Paragraph changed to:
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
https://review.coreboot.org/c/coreboot/+/33234/29//COMMIT_MSG@16 PS29, Line 16: resource
Why does it create a resource list? […]
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
https://review.coreboot.org/c/coreboot/+/33234/29//COMMIT_MSG@16 PS29, Line 16: tables
Where reside the page tables? […]
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page table to exist at startup.
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
https://review.coreboot.org/c/coreboot/+/33234/29/src/cpu/x86/mp_init.c File src/cpu/x86/mp_init.c:
https://review.coreboot.org/c/coreboot/+/33234/29/src/cpu/x86/mp_init.c@819 PS29, Line 819: uint32_t mseg;
I bet some compiler at some point is going to complain that this is unused when CONFIG(STM) is not t […]
done
https://review.coreboot.org/c/coreboot/+/33234/29/src/cpu/x86/mp_init.c@1055 PS29, Line 1055: state->smm_save_state_size +=
Does line 1055 recreate line 1045 without the guard? I'm a bit confused here. […]
fixed the code to what it should be, though what I have done is a conservative fudge. x86 architecture "requires" that, after the size of the elements of the smm save state are summed, the final size needs to be rounded up to the next power of 2. So, 0x1000 is a conservative fudge.
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Kco... File src/security/intel/stm/Kconfig:
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Kco... PS29, Line 5: default
Some Intel platforms are missing, why?
Not intentional, if there is a way to ensure that all the relevant x86 platforms are included please let me know.
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Kco... PS29, Line 6: (PLATFORM_USES_FSP2_0||PLATFORM_USES_FSP1_1||PLATFORM_USES_FSP1_0)
FSP1_0 support was dropped. […]
dropped FSP1_0 support and added CONFIG_SMM_TSEG requirement
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... PS29, Line 122: uint64_t resource_lo;
I guess this is intel code we should change as little as possible, but I'm puzzled they didn't just […]
Changed the code to initialize the variables in the declaration.
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... PS29, Line 144: != record->mem.rwx_attributes) {
This code may provide better justification for very long lines than I could ever make myself :-)
Ack
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... PS29, Line 483: retval
Never returned
Comment added in line 517 to indicate the out_of_resources return
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... PS29, Line 540: // ASSERT (false);
I assume the ASSERT comes with Intel's code? Thanks for changing that. […]
Thanks - it was a headache during debugging and it made no sense to brick the machine for an invalid input that really had no impact.
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... PS29, Line 623: * Create 4G page table for STM.
I just got lost. I see them setting PG_PS below. It looks like an array of 4M or 2M PTEs below. […]
Comment modified
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Smm... PS29, Line 637: pagetable_base += SIZE_4KB;
I have to say, the SIZE_4KB constant here is not that helpful to me ... it obscures meaning. […]
Fixed
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... File src/security/intel/stm/StmApi.h:
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 44: uint32_t intel_64mode_supported : 1; // bitfield
I think you can drop the bitfield comments; if people reading this don't know that already they don' […]
Fixed
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 226: uint32_t gdt_base_hi_dword; // fdd0h : NO
what does NO mean here?
Writable - comment added to indicate this
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 338: #define END_OF_RESOURCES 0
so sometimes we have enum and sometimes define, I was wondering if there is a reason.
Not that I know of.
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 113: ACPI_BASE_ADDRESS
Platform specific code doesn't belong here
Modified this to get the value set by the kconfig menu
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 116: attribute__((weak))
No need for weak
Have to disagree. Some platform setup code (baytrail) provides this call get_pmbase while others (Kabylake) do not provide the equivelent. Having this function as weak allows the STM setup to use the call when available and, failing that, get it from the configuration
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 126: 255
Depends on the mmconf size
Found that the variable was not used (other than being set), so I deleted it.
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 157: Fix-up
What's fixed?
deleted comment
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 32: retval
No true, returns only a single retval
Comments fixed
https://review.coreboot.org/c/coreboot/+/33234/29/src/security/intel/stm/Stm... PS29, Line 81: mem_region_device_ro_init(&stm_region
No commented code
Fixed
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 33:
(13 comments)
https://review.coreboot.org/c/coreboot/+/33234/29//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/33234/29//COMMIT_MSG@16 PS29, Line 16: tables
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset fi […]
That's an important fact that's need to be mentioned. Currently the SMM doesn't handle IA32e mode. Also adding x86_64 support to SMM is probably out of scope of this patch.
https://review.coreboot.org/c/coreboot/+/33234/29//COMMIT_MSG@16 PS29, Line 16: resource
The BIOS resource list defines the resources that the SMI Handler is allowed to access. […]
Thanks, I found that document. Please reference the document in the commit message or the STM's documentation in Documentation/
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Kco... File src/security/intel/stm/Kconfig:
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Kco... PS33, Line 40: config ACPI_BASE_ADDRESS that's defined in the platform headers. the correct approach would be to add get_pmbase() to all intel platforms
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Smm... PS33, Line 603: void stm_gen_4g_pagetable_ia32(uint32_t pagetable_base) this is unused
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Smm... PS33, Line 621: x86_32 it only creates 2M PTEs
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Smm... PS33, Line 641: for (index = 0; index < 4; index++) { this can be placed in CBFS and used with CB:36778 applied. If you don't want static page tables in ROM you can simply copy them.
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... PS33, Line 122: uint32_t uintptr_t
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... PS33, Line 127: uint32_t uintptr_t
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... PS33, Line 128: psd->smm_cs = 0x8; ROM_CODE_SEG
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... PS33, Line 129: 0x10 ROM_DATA_SEG
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... PS33, Line 130: 0x10 ROM_DATA_SEG
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... PS33, Line 131: 0x10 ROM_DATA_SEG
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... PS33, Line 132: psd->smm_tr = 0x18; ROM_CODE_SEG64
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 33:
(13 comments)
To do: I am looking for guidance/direction about the config to get Jenkins to build the STM.
Next patch set will be out Fri/Sat and will include the addition of get_pmbase for all Intel platforms. Unless the reviewers want me to separate them into separate CL's
https://review.coreboot.org/c/coreboot/+/33234/29//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/33234/29//COMMIT_MSG@16 PS29, Line 16: resource
Thanks, I found that document. […]
Will do.
https://review.coreboot.org/c/coreboot/+/33234/29//COMMIT_MSG@16 PS29, Line 16: tables
That's an important fact that's need to be mentioned. […]
At this point we are talking about STM internals.
(1) SMM does support IA32e mode, this support has existed before sandybridge and it is the mode that the STM functions in. See Chapter 5 of the STM User Guide. Also, the STM that we are using functions in that manner.
(2) The six pages noted above are actually located in the STM image, which by this time has been moved by the BIOS into the MSEG.
(3) The discussion in Chapter 5 talks about TXT based systems, in this case, SINIT creates the STM page tables and clears the STM heap. In non-TXT systems, the BIOS has to perform these functions.
This patch is responsible for moving the STM into the MSEG, setting up the BIOS resource list, creating the STM page tables and clearing the STM heap.
The operating system is responsible for starting the STM by doing a VMCALL from the root virtual machine.
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Kco... File src/security/intel/stm/Kconfig:
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Kco... PS33, Line 40: config ACPI_BASE_ADDRESS
that's defined in the platform headers. […]
Okay - I will add get_pmbase to all the intel patforms.
I will make those changes a part of this CL, unless you rather me make them as separate CL's
Note: next patch set will not be out until probably Friday or Saturday, too much going on.
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Smm... File src/security/intel/stm/SmmStm.c:
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Smm... PS33, Line 603: void stm_gen_4g_pagetable_ia32(uint32_t pagetable_base)
this is unused
Correct. This for those folks who want to run the STM as 32-bit. Since we are loading as x64 and the Intel documentation suggests that is the way to go, I am removing the code for now.
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Smm... PS33, Line 621: x86_32
it only creates 2M PTEs
Fixed
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Smm... PS33, Line 641: for (index = 0; index < 4; index++) {
this can be placed in CBFS and used with CB:36778 applied. […]
The problem with gen_pgtbl_x86_64 is that it uses malloc. The STM expects that it's page tables are being created in a six page region within the MSEG. The STM implementation has a specific memory layout where it expects everything to be and the location of the STM page tables are provided in the STM hardware header.
Not sure what you mean by "static page tables in rom"
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... PS33, Line 122: uint32_t
uintptr_t
Fixed
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... PS33, Line 127: uint32_t
uintptr_t
Fixed
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... PS33, Line 128: psd->smm_cs = 0x8;
ROM_CODE_SEG
Wouldn't it be better to use something like SMM_CODE_SEG, since it is pointing to the SMI handler, which is in SMM and not ROM?
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... PS33, Line 129: 0x10
ROM_DATA_SEG
SMM_DATA_SEG?
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... PS33, Line 130: 0x10
ROM_DATA_SEG
SMM_DATA_SEG?
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... PS33, Line 131: 0x10
ROM_DATA_SEG
SMM_DATA_SEG?
https://review.coreboot.org/c/coreboot/+/33234/33/src/security/intel/stm/Stm... PS33, Line 132: psd->smm_tr = 0x18;
ROM_CODE_SEG64
SMM_CODE_SEG64?
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#34).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page table to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c M src/soc/intel/apollolake/include/soc/pm.h M src/soc/intel/apollolake/pmutil.c M src/soc/intel/broadwell/pmutil.c M src/soc/intel/cannonlake/include/soc/pm.h M src/soc/intel/cannonlake/pmutil.c M src/soc/intel/icelake/include/soc/pm.h M src/soc/intel/icelake/pmutil.c M src/soc/intel/quark/acpi.c M src/soc/intel/quark/include/soc/pm.h M src/soc/intel/skylake/include/soc/pm.h M src/soc/intel/skylake/pmutil.c M src/soc/intel/tigerlake/include/soc/pm.h M src/soc/intel/tigerlake/pmutil.c 28 files changed, 2,170 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/34
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 34:
(6 comments)
https://review.coreboot.org/c/coreboot/+/33234/34/src/soc/intel/quark/acpi.c File src/soc/intel/quark/acpi.c:
https://review.coreboot.org/c/coreboot/+/33234/34/src/soc/intel/quark/acpi.c... PS34, Line 111: PCI_FUNCTION_NUMBER_QNC_LPC); code indent should use tabs where possible
https://review.coreboot.org/c/coreboot/+/33234/34/src/soc/intel/quark/acpi.c... PS34, Line 111: PCI_FUNCTION_NUMBER_QNC_LPC); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/33234/34/src/soc/intel/quark/acpi.c... PS34, Line 112: return (uint16_t) pci_read_config32(dev, R_QNC_LPC_PM1BLK) code indent should use tabs where possible
https://review.coreboot.org/c/coreboot/+/33234/34/src/soc/intel/quark/acpi.c... PS34, Line 112: return (uint16_t) pci_read_config32(dev, R_QNC_LPC_PM1BLK) please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/33234/34/src/soc/intel/quark/acpi.c... PS34, Line 113: & B_QNC_LPC_PM1BLK_MASK; code indent should use tabs where possible
https://review.coreboot.org/c/coreboot/+/33234/34/src/soc/intel/quark/acpi.c... PS34, Line 113: & B_QNC_LPC_PM1BLK_MASK; please, no spaces at the start of a line
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#35).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page table to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- A commit_message M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c M src/soc/intel/apollolake/include/soc/pm.h M src/soc/intel/apollolake/pmutil.c M src/soc/intel/broadwell/pmutil.c M src/soc/intel/cannonlake/include/soc/pm.h M src/soc/intel/cannonlake/pmutil.c M src/soc/intel/icelake/include/soc/pm.h M src/soc/intel/icelake/pmutil.c M src/soc/intel/quark/acpi.c M src/soc/intel/quark/include/soc/pm.h M src/soc/intel/skylake/include/soc/pm.h M src/soc/intel/skylake/pmutil.c M src/soc/intel/tigerlake/include/soc/pm.h M src/soc/intel/tigerlake/pmutil.c 29 files changed, 2,215 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/35
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#36).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page table to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- A commit_message M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c M src/soc/intel/apollolake/include/soc/pm.h M src/soc/intel/apollolake/pmutil.c M src/soc/intel/broadwell/pmutil.c M src/soc/intel/cannonlake/include/soc/pm.h M src/soc/intel/cannonlake/pmutil.c M src/soc/intel/icelake/include/soc/pm.h M src/soc/intel/icelake/pmutil.c M src/soc/intel/quark/acpi.c M src/soc/intel/quark/include/soc/pm.h M src/soc/intel/skylake/include/soc/pm.h M src/soc/intel/skylake/pmutil.c M src/soc/intel/tigerlake/include/soc/pm.h M src/soc/intel/tigerlake/pmutil.c 29 files changed, 2,214 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/36
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 36:
Patch Set 33:
(13 comments)
To do: I am looking for guidance/direction about the config to get Jenkins to build the STM.
Next patch set will be out Fri/Sat and will include the addition of get_pmbase for all Intel platforms. Unless the reviewers want me to separate them into separate CL's
Given the requests people made to have it in one CL, back when it was multiple CLs, let's just keep it in one CL.
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 36:
Patch Set 36:
Patch Set 33:
(13 comments)
To do: I am looking for guidance/direction about the config to get Jenkins to build the STM.
Next patch set will be out Fri/Sat and will include the addition of get_pmbase for all Intel platforms. Unless the reviewers want me to separate them into separate CL's
Given the requests people made to have it in one CL, back when it was multiple CLs, let's just keep it in one CL.
I request it to be split into smaller chunks that separate code changes by topic, can be easily reviewed, that build and doesn't break existing platforms.
I'm not sure if CamelCase coding style is allowed, as no other file has it.
To let Jenkins build test it: add a defconfig to the configs/ folder
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#37).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page table to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- A commit_message M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c M src/soc/intel/apollolake/include/soc/pm.h M src/soc/intel/apollolake/pmutil.c M src/soc/intel/broadwell/pmutil.c M src/soc/intel/cannonlake/include/soc/pm.h M src/soc/intel/cannonlake/pmutil.c M src/soc/intel/icelake/include/soc/pm.h M src/soc/intel/icelake/pmutil.c M src/soc/intel/quark/acpi.c M src/soc/intel/quark/include/soc/pm.h M src/soc/intel/skylake/include/soc/pm.h M src/soc/intel/skylake/pmutil.c M src/soc/intel/tigerlake/include/soc/pm.h M src/soc/intel/tigerlake/pmutil.c 29 files changed, 2,219 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/37
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 37:
Patch Set 37:
Patch Set 36:
Patch Set 33:
(13 comments)
To do: I am looking for guidance/direction about the config to get Jenkins to build the STM.
Next patch set will be out Fri/Sat and will include the addition of get_pmbase for all Intel platforms. Unless the reviewers want me to separate them into separate CL's
Given the requests people made to have it in one CL, back when it was multiple CLs, let's just keep it in one CL.
given the comments I've received in keeping the CL as one large entity, I can easily split out the just added modifications, into a separate CL without harm (aside from certain platforms not building when the STM because of a linking error).
However, I have a more fundamental issue. I have added a "select USE_BLOBS" to stm/Kconfig to ensure that 3rdparty/blobs/cpu/intel/stm/* is pulled in as it is needed to build.
The blobs directory is pulled but the cpu/intel/stm directory is not pulled in, which is causing the Jenkins regression builds to abort.
If I go to review.coreboot.org/blobs the STM directory is there in master and is in the commit log.
When go to 3rdparty/blobs on my test system, as noted earlier, the cpu/intel/stm directory is not there.
When I do a "git status" I receive the following message:
HEAD detached at 034b278 nothing to commit, working directory clean
A "git log" produces a list of commits starting after the cpu/intel commit.
How do we fix this as this is what is prevent a clean build with the STM enabled.
gene
Please do not review this patch set, I need to resolve this first (just that this system is not allowing me to send a message otherwise)
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 41:
I'll split the platform files in the next patch distro
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 43:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33234/43/src/cpu/x86/mp_init.c File src/cpu/x86/mp_init.c:
https://review.coreboot.org/c/coreboot/+/33234/43/src/cpu/x86/mp_init.c@1050 PS43, Line 1050: * algorithm. (set it to 1K) this is setting it to 4K, not 1k?
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#44).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page table to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Issue: When the STM is enabled the stm.bin is not properly loaded causing the build to fail. Workaround, get the stm.bin from the blobs/cpu/intel/stm directory in the blobs.git repository
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 15 files changed, 2,114 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/44
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 44:
(1 comment)
fixed and released new CL
https://review.coreboot.org/c/coreboot/+/33234/43/src/cpu/x86/mp_init.c File src/cpu/x86/mp_init.c:
https://review.coreboot.org/c/coreboot/+/33234/43/src/cpu/x86/mp_init.c@1050 PS43, Line 1050: * algorithm. (set it to 1K)
this is setting it to 4K, not 1k?
Fixed
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 44: Code-Review+2
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 44:
(10 comments)
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformResource.h:
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 24: #define LPC_FUNCTION 0 is this still used?
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 30: SMRR_PHYSBASE_MSR why aren't those define in msr.h?
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 20: #include <southbridge/intel/common/pmutil.h> that's only correct for SOUTHBRIDGE_INTEL_COMMON_PMCLIB for other platforms this should include <soc/pm.h>
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 26: uint32_t m_tseg_base; can be removed. those are only written and read once.
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 31: uint64_t uint64; can be removed. It's only used once and the same operation can be done with simple arithmethics
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 113: #ifndef ACPI_BASE_ADDRESS please remove
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 181: Status = add_pi_resource((void *)&rsc_lpc_bridge_pci, 1); return code not checked
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 198: Status = add_pi_resource((void *)&rsc_msr_tpl, 1); return code not checked
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 90: #define SMM_CODE_SEG 0x8 that's not the right place. The other segment defines are in src/arch/x86/include/arch/*_segs.h
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 181: load_stm_image(mseg); return code not checked
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 44: -Code-Review
(1 comment)
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 113: #ifndef ACPI_BASE_ADDRESS
please remove
Eugene in case there is confusion, please remove the whole commented out block.
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 44:
(10 comments)
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformResource.h:
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 24: #define LPC_FUNCTION 0
is this still used?
LPC_DEVICE and LPC_FUNCTION are used in StmPlatformResource.c. LPC_BUS has been removed
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 30: SMRR_PHYSBASE_MSR
why aren't those define in msr. […]
all MSR defines have been moved to msr.h
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformResource.c:
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 20: #include <southbridge/intel/common/pmutil.h>
that's only correct for SOUTHBRIDGE_INTEL_COMMON_PMCLIB […]
Done
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 26: uint32_t m_tseg_base;
can be removed. those are only written and read once.
Done
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 31: uint64_t uint64;
can be removed. […]
Done
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 113: #ifndef ACPI_BASE_ADDRESS
Eugene in case there is confusion, please remove the whole commented out block.
Done
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 181: Status = add_pi_resource((void *)&rsc_lpc_bridge_pci, 1);
return code not checked
Done
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 198: Status = add_pi_resource((void *)&rsc_msr_tpl, 1);
return code not checked
Done
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 90: #define SMM_CODE_SEG 0x8
that's not the right place. The other segment defines are in […]
created smm_segs.h
https://review.coreboot.org/c/coreboot/+/33234/44/src/security/intel/stm/Stm... PS44, Line 181: load_stm_image(mseg);
return code not checked
Done
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, ron minnich, Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#45).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page tables to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Issue: When the STM is enabled the stm.bin is not properly loaded causing the build to fail. Workaround, get the stm.bin from the blobs/cpu/intel/stm directory in the blobs.git repository
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 15 files changed, 2,092 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/45
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 46:
(2 comments)
https://review.coreboot.org/c/coreboot/+/33234/46/src/include/cpu/x86/msr.h File src/include/cpu/x86/msr.h:
https://review.coreboot.org/c/coreboot/+/33234/46/src/include/cpu/x86/msr.h@... PS46, Line 60: #define IA32_VMX_MISC_MSR 0x485 (I don't know the answer to my question) are the MCA_STATUS bit values below relates to the MC0_STATUS register at line 58? If so, lines 59 and 60 should move below them.
https://review.coreboot.org/c/coreboot/+/33234/46/src/security/intel/stm/Mak... File src/security/intel/stm/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/33234/46/src/security/intel/stm/Mak... PS46, Line 12: #smm-$(CONFIG_STM) += StmPlatformResource.c why is this commented out? I don't recall.
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 46:
(2 comments)
Will be posting an corrected patchset soon
https://review.coreboot.org/c/coreboot/+/33234/46/src/include/cpu/x86/msr.h File src/include/cpu/x86/msr.h:
https://review.coreboot.org/c/coreboot/+/33234/46/src/include/cpu/x86/msr.h@... PS46, Line 60: #define IA32_VMX_MISC_MSR 0x485
(I don't know the answer to my question) […]
Done
https://review.coreboot.org/c/coreboot/+/33234/46/src/security/intel/stm/Mak... File src/security/intel/stm/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/33234/46/src/security/intel/stm/Mak... PS46, Line 12: #smm-$(CONFIG_STM) += StmPlatformResource.c
why is this commented out? I don't recall.
These are artifacts from the initial version. The setup method has been simplified and these are no longer needed and have been removed
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, ron minnich, Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#47).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page tables to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Issue: When the STM is enabled the stm.bin is not properly loaded causing the build to fail. Workaround, get the stm.bin from the blobs/cpu/intel/stm directory in the blobs.git repository
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 15 files changed, 2,088 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/47
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, ron minnich, Sumeet R Pawnikar, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#48).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page tables to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Issue: When the STM is enabled the stm.bin is not properly loaded causing the build to fail. Workaround, get the stm.bin from the blobs/cpu/intel/stm directory in the blobs.git repository
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 15 files changed, 2,088 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/48
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 48: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 48: Code-Review+1
(3 comments)
https://review.coreboot.org/c/coreboot/+/33234/48/src/cpu/x86/mp_init.c File src/cpu/x86/mp_init.c:
https://review.coreboot.org/c/coreboot/+/33234/48/src/cpu/x86/mp_init.c@357 PS48, Line 357: abiility why is a typo being added?
https://review.coreboot.org/c/coreboot/+/33234/48/src/cpu/x86/mp_init.c@758 PS48, Line 758: } else Code style says that, since the if-branch needs braces, the else-branch should use braces as well:
https://doc.coreboot.org/coding_style.html
https://review.coreboot.org/c/coreboot/+/33234/48/src/cpu/x86/mp_init.c@1040 PS48, Line 1040: // make sure there is enough room for the SMM descriptor nit: comment style should be consistent
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 48: Code-Review+1
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 48:
(3 comments)
Will issue a new patch set once I get the smm_segs.h issue resolved
https://review.coreboot.org/c/coreboot/+/33234/48/src/cpu/x86/mp_init.c File src/cpu/x86/mp_init.c:
https://review.coreboot.org/c/coreboot/+/33234/48/src/cpu/x86/mp_init.c@357 PS48, Line 357: abiility
why is a typo being added?
Not sure how this happened, but this has been fixed
https://review.coreboot.org/c/coreboot/+/33234/48/src/cpu/x86/mp_init.c@758 PS48, Line 758: } else
Code style says that, since the if-branch needs braces, the else-branch should use braces as well: […]
Fixed. Also, corrected instances in SmmStm.c and StmPlatformSmm.c
https://review.coreboot.org/c/coreboot/+/33234/48/src/cpu/x86/mp_init.c@1040 PS48, Line 1040: // make sure there is enough room for the SMM descriptor
nit: comment style should be consistent
Done
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 48:
I assume the -1 is because we don't test builds with STM enabled. I thought we only test builds with default configs (that used to be true, and why it is why bayou bit-rotted for years and we had to just remove it).
If someone can correct my misunderstanding, let me know, else my +2 stands.
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 48: Code-Review+1
Patch Set 48:
I assume the -1 is because we don't test builds with STM enabled. I thought we only test builds with default configs (that used to be true, and why it is why bayou bit-rotted for years and we had to just remove it).
If someone can correct my misunderstanding, let me know, else my +2 stands.
so I'm hopelessly out of touch. I'll as Eugene for a test build config.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 48:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33234/48/src/cpu/x86/mp_init.c File src/cpu/x86/mp_init.c:
https://review.coreboot.org/c/coreboot/+/33234/48/src/cpu/x86/mp_init.c@357 PS48, Line 357: abiility
Not sure how this happened, but this has been fixed
Where? There isn't a new patchset
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 48:
(1 comment)
Patch Set 48: Code-Review+1
Patch Set 48:
I assume the -1 is because we don't test builds with STM enabled. I thought we only test builds with default configs (that used to be true, and why it is why bayou bit-rotted for years and we had to just remove it).
If someone can correct my misunderstanding, let me know, else my +2 stands.
so I'm hopelessly out of touch. I'll as Eugene for a test build config.
I would also like a boot-test to be sure code doesn't break. For the build test config, just place a defconfig file in configs/ that selects STM
https://review.coreboot.org/c/coreboot/+/33234/48/src/security/intel/stm/Stm... File src/security/intel/stm/StmPlatformSmm.c:
https://review.coreboot.org/c/coreboot/+/33234/48/src/security/intel/stm/Stm... PS48, Line 153: FXSAVE_SIZE That is defined in src/cpu/x86/smm/smm_module_loader.c already, maybe the define should be moved into a header?
In any case, this can be done later.
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 48:
Patch Set 48:
(1 comment)
Working to get it out
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, ron minnich, Sumeet R Pawnikar, Angel Pons, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#49).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page tables to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Issue: When the STM is enabled the stm.bin is not properly loaded causing the build to fail. Workaround, get the stm.bin from the blobs/cpu/intel/stm directory in the blobs.git repository
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- A configs/config.stm M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 16 files changed, 2,100 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/49
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, ron minnich, Sumeet R Pawnikar, Angel Pons, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#50).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page tables to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Issue: When the STM is enabled the stm.bin is not properly loaded causing the build to fail. Workaround, get the stm.bin from the blobs/cpu/intel/stm directory in the blobs.git repository
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- A configs/config.stm M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 16 files changed, 2,099 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/50
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 50:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33234/50/configs/config.stm File configs/config.stm:
PS50: Does qemu-pc support STM?
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 50:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33234/50/configs/config.stm File configs/config.stm:
PS50:
Does qemu-pc support STM?
I checked and it does not seem to support a STM. It seems,though, that with some effort it probably could.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 50:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33234/50/configs/config.stm File configs/config.stm:
PS50:
I checked and it does not seem to support a STM. […]
Then, it would be better to use a platform that supports STM here.
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, ron minnich, Sumeet R Pawnikar, Angel Pons, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#51).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page tables to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Issue: When the STM is enabled the stm.bin is not properly loaded causing the build to fail. Workaround, get the stm.bin from the blobs/cpu/intel/stm directory in the blobs.git repository
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- A configs/config.stm M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 16 files changed, 2,121 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/51
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 50:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33234/50/configs/config.stm File configs/config.stm:
PS50:
Then, it would be better to use a platform that supports STM here.
did a make savedefconfig and place the result into config.stm
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 51:
(2 comments)
https://review.coreboot.org/c/coreboot/+/33234/51/src/cpu/x86/mp_init.c File src/cpu/x86/mp_init.c:
https://review.coreboot.org/c/coreboot/+/33234/51/src/cpu/x86/mp_init.c@1051 PS51, Line 1051: * that require alignment of the save state on 32K boundries. 'boundries' may be misspelled - perhaps 'boundaries'?
https://review.coreboot.org/c/coreboot/+/33234/51/src/security/intel/stm/Stm... File src/security/intel/stm/StmApi.h:
https://review.coreboot.org/c/coreboot/+/33234/51/src/security/intel/stm/Stm... PS51, Line 486: // Intepreter of DomainType 'Intepreter' may be misspelled - perhaps 'Interpreter'?
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, ron minnich, Sumeet R Pawnikar, Angel Pons, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#52).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page tables to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Issue: When the STM is enabled the stm.bin is not properly loaded causing the build to fail. Workaround, get the stm.bin from the blobs/cpu/intel/stm directory in the blobs.git repository
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- A configs/config.stm M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 16 files changed, 2,121 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/52
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 51:
(2 comments)
random spell check...
https://review.coreboot.org/c/coreboot/+/33234/51/src/cpu/x86/mp_init.c File src/cpu/x86/mp_init.c:
https://review.coreboot.org/c/coreboot/+/33234/51/src/cpu/x86/mp_init.c@1051 PS51, Line 1051: * that require alignment of the save state on 32K boundries.
'boundries' may be misspelled - perhaps 'boundaries'?
Done
https://review.coreboot.org/c/coreboot/+/33234/51/src/security/intel/stm/Stm... File src/security/intel/stm/StmApi.h:
https://review.coreboot.org/c/coreboot/+/33234/51/src/security/intel/stm/Stm... PS51, Line 486: // Intepreter of DomainType
'Intepreter' may be misspelled - perhaps 'Interpreter'?
Done
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, ron minnich, Sumeet R Pawnikar, Angel Pons, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#53).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page tables to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Issue: When the STM is enabled the stm.bin is not properly loaded causing the build to fail. Workaround, get the stm.bin from the blobs/cpu/intel/stm directory in the blobs.git repository
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- A configs/config.stm M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 16 files changed, 2,121 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/53
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 54:
(2 comments)
Do some of the CamelCasedNamed files come from Tianocore? If so, some information on the commit they've been taken from would be good to have to ease future updates.
https://review.coreboot.org/c/coreboot/+/33234/54/configs/config.stm File configs/config.stm:
https://review.coreboot.org/c/coreboot/+/33234/54/configs/config.stm@2 PS54, Line 2: CONFIG_VENDOR_PURISM=y : CONFIG_MAINBOARD_VENDOR="google" : CONFIG_MAINBOARD_SMBIOS_MANUFACTURER="Emulation" that's a weird combination, I guess this config underwent a couple of iterations on different boards?
https://review.coreboot.org/c/coreboot/+/33234/54/src/security/intel/stm/Kco... File src/security/intel/stm/Kconfig:
https://review.coreboot.org/c/coreboot/+/33234/54/src/security/intel/stm/Kco... PS54, Line 4: bool "Enable STM" The integration in mp_init.c suggests that with enabled STM, you either get STM+SMM or no SMM running at all. Maybe mention this somewhere with this flag?
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 54:
(2 comments)
Patch Set 54:
(2 comments)
Do some of the CamelCasedNamed files come from Tianocore? If so, some information on the commit they've been taken from would be good to have to ease future updates.
Yes - the files within security/intel/smm come directly from their Tianocore counterparts. Unnecessary code has been removed and the remaining code has been converted to meet coreboot coding requirements.
Added the gist of the previous statement to the commit
https://review.coreboot.org/c/coreboot/+/33234/54/configs/config.stm File configs/config.stm:
https://review.coreboot.org/c/coreboot/+/33234/54/configs/config.stm@2 PS54, Line 2: CONFIG_VENDOR_PURISM=y : CONFIG_MAINBOARD_VENDOR="google" : CONFIG_MAINBOARD_SMBIOS_MANUFACTURER="Emulation"
that's a weird combination, I guess this config underwent a couple of iterations on different boards […]
I see the error of my ways.. I did not do a make distclean.
https://review.coreboot.org/c/coreboot/+/33234/54/src/security/intel/stm/Kco... File src/security/intel/stm/Kconfig:
https://review.coreboot.org/c/coreboot/+/33234/54/src/security/intel/stm/Kco... PS54, Line 4: bool "Enable STM"
The integration in mp_init. […]
The error message (line 769) in mp_init.c has been changed to read:
"STM not loaded because SMM is not enabled!"
Also, added information in the Kconfig help to indicate that to have an STM, SMM must be enabled.
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, ron minnich, Sumeet R Pawnikar, Angel Pons, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#55).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page tables to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
Note: The files within security/intel/stm come directly from their Tianocore counterparts. Unnecessary code has been removed and the remaining code has been converted to meet coreboot coding requirements.
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Issue: When the STM is enabled the stm.bin is not properly loaded causing the build to fail. Workaround, get the stm.bin from the blobs/cpu/intel/stm directory in the blobs.git repository
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- A configs/config.stm M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 16 files changed, 2,104 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/55
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 55: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/33234/55//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/33234/55//COMMIT_MSG@56 PS55, Line 56: Issue: When the STM is enabled the stm.bin is not properly : loaded causing the build to fail. Workaround, get the : stm.bin from the blobs/cpu/intel/stm directory in the blobs.git : repository what's this supposed to mean?
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 55:
(1 comment)
Patch Set 55: Code-Review+1
(1 comment)
This comment notes an issue where the build process does not pull in blobs/cpu/intel/stm when pulling in the remainder of the blobs.
https://review.coreboot.org/c/coreboot/+/33234/55//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/33234/55//COMMIT_MSG@56 PS55, Line 56: Issue: When the STM is enabled the stm.bin is not properly : loaded causing the build to fail. Workaround, get the : stm.bin from the blobs/cpu/intel/stm directory in the blobs.git : repository
what's this supposed to mean?
Even though stm.bin has incorporated into blobs/cpu/intel/stm. When the build process pulls in the blobs, it does not pull in stm.bin. Cannot tell why, if you look into the blobs repro, stm/stm.bin is the last commit.
So, I had to provide a work around.
ron minnich has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 55: Code-Review+2
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 55:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33234/55//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/33234/55//COMMIT_MSG@56 PS55, Line 56: Issue: When the STM is enabled the stm.bin is not properly : loaded causing the build to fail. Workaround, get the : stm.bin from the blobs/cpu/intel/stm directory in the blobs.git : repository
Even though stm.bin has incorporated into blobs/cpu/intel/stm. […]
git submodules always point at a specific commit, so when you push a change to a submodule (such as blobs), you also have to provide a commit to the parent repo to update that pointer. See CB:38717
Hello Kyösti Mälkki, Werner Zeh, Patrick Rudolph, Aaron Durbin, ron minnich, Sumeet R Pawnikar, Angel Pons, Christian Walter, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33234
to look at the new patch set (#56).
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page tables to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
Note: The files within security/intel/stm come directly from their Tianocore counterparts. Unnecessary code has been removed and the remaining code has been converted to meet coreboot coding requirements.
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov --- A configs/config.stm M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 16 files changed, 2,104 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33234/56
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 56:
(1 comment)
Removed the issue paragraph from the commit message.
https://review.coreboot.org/c/coreboot/+/33234/55//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/33234/55//COMMIT_MSG@56 PS55, Line 56: Issue: When the STM is enabled the stm.bin is not properly : loaded causing the build to fail. Workaround, get the : stm.bin from the blobs/cpu/intel/stm directory in the blobs.git : repository
git submodules always point at a specific commit, so when you push a change to a submodule (such as […]
Thanks, I've learned a lot about git during this whole process. I've removed the issue paragraph from the git message.
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
security/intel/stm: Add STM support
This update is a combination of all four of the patches so that the commit can be done without breaking parts of coreboot. This possible breakage is because of the cross-dependencies between the original separate patches would cause failure because of data structure changes.
security/intel/stm
This directory contains the functions that check and move the STM to the MSEG, create its page tables, and create the BIOS resource list.
The STM page tables is a six page region located in the MSEG and are pointed to by the CR3 Offset field in the MSEG header. The initial page tables will identity map all memory between 0-4G. The STM starts in IA32e mode, which requires page tables to exist at startup.
The BIOS resource list defines the resources that the SMI Handler is allowed to access. This includes the SMM memory area where the SMI handler resides and other resources such as I/O devices. The STM uses the BIOS resource list to restrict the SMI handler's accesses.
The BIOS resource list is currently located in the same area as the SMI handler. This location is shown in the comment section before smm_load_module in smm_module_loader.c
Note: The files within security/intel/stm come directly from their Tianocore counterparts. Unnecessary code has been removed and the remaining code has been converted to meet coreboot coding requirements.
For more information see: SMI Transfer Monitor (STM) User Guide, Intel Corp., August 2015, Rev 1.0, can be found at firmware.intel.com
include/cpu/x86:
Addtions to include/cpu/x86 for STM support.
cpu/x86:
STM Set up - The STM needs to be loaded into the MSEG during BIOS initialization and the SMM Monitor Control MSR be set to indicate that an STM is in the system.
cpu/x86/smm:
SMI module loader modifications needed to set up the SMM descriptors used by the STM during its initialization
Change-Id: If4adcd92c341162630ce1ec357ffcf8a135785ec Signed-off-by: Eugene D. Myers edmyers@tycho.nsa.gov Reviewed-on: https://review.coreboot.org/c/coreboot/+/33234 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Georgi pgeorgi@google.com Reviewed-by: ron minnich rminnich@gmail.com --- A configs/config.stm M src/cpu/x86/mp_init.c M src/cpu/x86/smm/smm_module_loader.c M src/cpu/x86/smm/smm_stub.S M src/include/cpu/x86/msr.h M src/include/cpu/x86/smm.h M src/security/intel/Kconfig M src/security/intel/Makefile.inc A src/security/intel/stm/Kconfig A src/security/intel/stm/Makefile.inc A src/security/intel/stm/SmmStm.c A src/security/intel/stm/SmmStm.h A src/security/intel/stm/StmApi.h A src/security/intel/stm/StmPlatformResource.c A src/security/intel/stm/StmPlatformResource.h A src/security/intel/stm/StmPlatformSmm.c 16 files changed, 2,104 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, but someone else must approve ron minnich: Looks good to me, approved
diff --git a/configs/config.stm b/configs/config.stm new file mode 100644 index 0000000..59792b2 --- /dev/null +++ b/configs/config.stm @@ -0,0 +1,4 @@ +CONFIG_VENDOR_PURISM=y +CONFIG_BOARD_PURISM_LIBREM15_V4=y +CONFIG_STM=y +CONFIG_IED_REGION_SIZE=0 diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index b093be7..331f3b5 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -38,6 +38,8 @@ #include <timer.h> #include <thread.h>
+#include <security/intel/stm/SmmStm.h> + #define MAX_APIC_IDS 256
struct mp_callback { @@ -743,6 +745,23 @@
/* Setup code checks this callback for validity. */ mp_state.ops.relocation_handler(cpu, curr_smbase, perm_smbase); + + if (CONFIG(STM)) { + if (is_smm_enabled()) { + uintptr_t mseg; + + mseg = mp_state.perm_smbase + + (mp_state.perm_smsize - CONFIG_MSEG_SIZE); + + stm_setup(mseg, p->cpu, runtime->num_cpus, + perm_smbase, + mp_state.perm_smbase, + runtime->start32_offset); + } else { + printk(BIOS_DEBUG, + "STM not loaded because SMM is not enabled!\n"); + } + } }
static void adjust_smm_apic_id_map(struct smm_loader_params *smm_params) @@ -1023,6 +1042,21 @@ &state->smm_save_state_size);
/* + * Make sure there is enough room for the SMM descriptor + */ + if (CONFIG(STM)) + state->smm_save_state_size += + sizeof(TXT_PROCESSOR_SMM_DESCRIPTOR); + + /* Currently, the CPU SMM save state size is based on a simplistic + * algorithm. (align on 4K) + * note: In the future, this will need to handle newer x86 processors + * that require alignment of the save state on 32K boundaries. + */ + state->smm_save_state_size = + ALIGN_UP(state->smm_save_state_size, 0x1000); + + /* * Default to smm_initiate_relocation() if trigger callback isn't * provided. */ diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c index c6c6b38..a421436 100644 --- a/src/cpu/x86/smm/smm_module_loader.c +++ b/src/cpu/x86/smm/smm_module_loader.c @@ -17,6 +17,7 @@ #include <cpu/x86/cache.h> #include <commonlib/helpers.h> #include <console/console.h> +#include <security/intel/stm/SmmStm.h>
#define FXSAVE_SIZE 512
@@ -267,6 +268,7 @@ stub_params->fxsave_area_size = FXSAVE_SIZE; stub_params->runtime.smbase = (uintptr_t)smbase; stub_params->runtime.save_state_size = params->per_cpu_save_state_size; + stub_params->runtime.num_cpus = params->num_concurrent_stacks;
/* Initialize the APIC id to CPU number table to be 1:1 */ for (i = 0; i < params->num_concurrent_stacks; i++) @@ -313,6 +315,11 @@ * +-----------------+ <- smram + size * | stacks | * +-----------------+ <- smram + size - total_stack_size + * | fxsave area | + * +-----------------+ <- smram + size - total_stack_size - fxsave_size + * | BIOS resource | + * | list (STM) | + * +-----------------+ <- .. - CONFIG_BIOS_RESOURCE_LIST_SIZE * | ... | * +-----------------+ <- smram + handler_size + SMM_DEFAULT_SIZE * | handler | @@ -353,7 +360,12 @@
/* Stacks start at the top of the region. */ base = smram; - base += size; + + if (CONFIG(STM)) + base += size - CONFIG_MSEG_SIZE; // take out the mseg + else + base += size; + params->stack_top = base;
/* SMM module starts at offset SMM_DEFAULT_SIZE with the load alignment @@ -382,6 +394,11 @@ /* Does the required amount of memory exceed the SMRAM region size? */ total_size = total_stack_size + handler_size; total_size += fxsave_size + SMM_DEFAULT_SIZE; + + // account for the bios resource list + if (CONFIG(STM)) + total_size += CONFIG_BIOS_RESOURCE_LIST_SIZE; + if (total_size > size) return -1;
diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S index f0e55f9..8207d23 100644 --- a/src/cpu/x86/smm/smm_stub.S +++ b/src/cpu/x86/smm/smm_stub.S @@ -44,6 +44,11 @@ .long 0 save_state_size: .long 0 +num_cpus: +.long 0 +/* allows the STM to bring up SMM in 32-bit mode */ +start32_offset: +.long smm_trampoline32 - _start /* apic_to_cpu_num is a table mapping the default APIC id to CPU num. If the * APIC id is found at the given index, the contiguous CPU number is index * into the table. */ @@ -90,6 +95,14 @@ /* gdt selector 0x10, flat data segment */ .word 0xffff, 0x0000 .byte 0x00, 0x93, 0xcf, 0x00 + + /* gdt selector 0x18, flat code segment (64-bit) */ + .word 0xffff, 0x0000 + .byte 0x00, 0x9b, 0xcf, 0x00 + + /* gdt selector 0x20 tss segment */ + .word 0xffff, 0x0000 + .byte 0x00, 0x8b, 0x80, 0x00 smm_relocate_gdt_end:
.align 4 diff --git a/src/include/cpu/x86/msr.h b/src/include/cpu/x86/msr.h index 63cb8bd..49abd41 100644 --- a/src/include/cpu/x86/msr.h +++ b/src/include/cpu/x86/msr.h @@ -16,6 +16,7 @@ /* Page attribute type MSR */ #define TSC_MSR 0x10 #define IA32_PLATFORM_ID 0x17 +#define IA32_APIC_BASE_MSR_INDEX 0x1B #define IA32_FEATURE_CONTROL 0x3a #define FEATURE_CONTROL_LOCK_BIT (1 << 0) #define FEATURE_ENABLE_VMX (1 << 2) @@ -30,6 +31,10 @@ #define IA32_BIOS_SIGN_ID 0x8b #define IA32_MPERF 0xe7 #define IA32_APERF 0xe8 +/* STM */ +#define IA32_SMM_MONITOR_CTL_MSR 0x9B +#define SMBASE_RO_MSR 0x98 +#define IA32_SMM_MONITOR_VALID (1 << 0) #define IA32_MCG_CAP 0x179 #define MCG_CTL_P (1 << 3) #define MCA_BANKS_MASK 0xff @@ -45,6 +50,9 @@ #define ENERGY_POLICY_POWERSAVE 15 #define IA32_PACKAGE_THERM_INTERRUPT 0x1b2 #define IA32_PLATFORM_DCA_CAP 0x1f8 +#define SMRR_PHYSBASE_MSR 0x1F2 +#define SMRR_PHYSMASK_MSR 0x1F3 +#define IA32_PLATFORM_DCA_CAP 0x1f8 #define IA32_PAT 0x277 #define IA32_MC0_CTL 0x400 #define IA32_MC0_STATUS 0x401 @@ -65,6 +73,8 @@ #define MCA_STATUS_LO_ERRCODE_EXT_SH 16 #define MCA_STATUS_LO_ERRCODE_EXT_MASK (0x3f << MCA_STATUS_LO_ERRCODE_EXT_SH) #define MCA_STATUS_LO_ERRCODE_MASK (0xffff << 0) +#define IA32_VMX_BASIC_MSR 0x480 +#define IA32_VMX_MISC_MSR 0x485 #define MC0_ADDR 0x402 #define MC0_MISC 0x403 #define MC0_CTL_MASK 0xC0010044 diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index cf107b1..9efe2e0 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -64,6 +64,9 @@ struct smm_runtime { u32 smbase; u32 save_state_size; + u32 num_cpus; + /* STM's 32bit entry into SMI handler */ + u32 start32_offset; /* The apic_id_to_cpu provides a mapping from APIC id to CPU number. * The CPU number is indicated by the index into the array by matching * the default APIC id and value at the index. The stub loader diff --git a/src/security/intel/Kconfig b/src/security/intel/Kconfig index a4525e7..aa24e8a 100644 --- a/src/security/intel/Kconfig +++ b/src/security/intel/Kconfig @@ -14,3 +14,4 @@ ##
source "src/security/intel/txt/Kconfig" +source "src/security/intel/stm/Kconfig" diff --git a/src/security/intel/Makefile.inc b/src/security/intel/Makefile.inc index 9388d3f..e00802a 100644 --- a/src/security/intel/Makefile.inc +++ b/src/security/intel/Makefile.inc @@ -1 +1,2 @@ subdirs-y += txt +subdirs-y += stm diff --git a/src/security/intel/stm/Kconfig b/src/security/intel/stm/Kconfig new file mode 100644 index 0000000..a74eba8 --- /dev/null +++ b/src/security/intel/stm/Kconfig @@ -0,0 +1,49 @@ + + +config STM + bool "Enable STM" + default n + depends on SMM_TSEG + select USE_BLOBS + + help + Enabling the STM will load a simple hypervisor into SMM that will + restrict the actions of the SMI handler, which is the part of BIOS + that functions in system management mode (SMM). The kernel can + configure the STM to prevent the SMI handler from accessing platform + resources. + The STM closes a vulnerability in Intel TXT (D-RTM) + The SMI handler provides a list of platform resources that it + requires access to the STM during STM startup, which the kernel + cannot override. + An additional capability, called STM-PE, provides a protected + execution capability that allows modules to be executed without + observation and interference. Examples of usage include kernel + introspection and virtualized trusted platform module (vTPM). + Requirement: SMM must be enabled and there must be sufficient room + within the TSEG to fit the MSEG. + +if STM + +menu "SMI Transfer Monitor (STM)" + +config MSEG_SIZE + hex "mseg size" + default 0x400000 + help + STM only - 0x100000 + STM/PE - 0x300000+ depending on the amount of memory needed + for the protected execution virtual + machine (VM/PE) + +config BIOS_RESOURCE_LIST_SIZE + hex "bios_resource_list_size" + default 0x1000 + +config STM_BINARY_FILE + string "STM binary file" + default "3rdparty/blobs/cpu/intel/stm/stm.bin" + +endmenu #STM + +endif diff --git a/src/security/intel/stm/Makefile.inc b/src/security/intel/stm/Makefile.inc new file mode 100644 index 0000000..1a23fe9 --- /dev/null +++ b/src/security/intel/stm/Makefile.inc @@ -0,0 +1,10 @@ + +# put the stm where it can be found + +cbfs-files-$(CONFIG_STM) += stm.bin +stm.bin-file := $(CONFIG_STM_BINARY_FILE) +stm.bin-type := raw + +ramstage-$(CONFIG_STM) += SmmStm.c +ramstage-$(CONFIG_STM) += StmPlatformSmm.c +ramstage-$(CONFIG_STM) += StmPlatformResource.c diff --git a/src/security/intel/stm/SmmStm.c b/src/security/intel/stm/SmmStm.c new file mode 100644 index 0000000..f23be70 --- /dev/null +++ b/src/security/intel/stm/SmmStm.c @@ -0,0 +1,691 @@ +/* @file + * SMM STM support + * + * Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. + * + * This program and the accompanying materials are licensed and made available + * under the terms and conditions of the BSD License which accompanies this + * distribution. The full text of the license may be found at + * http://opensource.org/licenses/bsd-license.php. + * + * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR + * IMPLIED. + * + */ + +#include <console/console.h> +#include <cpu/x86/cr.h> +#include <cpu/x86/mp.h> +#include <cpu/x86/msr.h> +#include <cpu/x86/cache.h> +#include <security/intel/stm/SmmStm.h> +#include <string.h> + +#define TXT_EVTYPE_BASE 0x400 +#define TXT_EVTYPE_STM_HASH (TXT_EVTYPE_BASE + 14) + +#define RDWR_ACCS 3 +#define FULL_ACCS 7 + +#define SIZE_4KB 0x00001000 +#define SIZE_4MB 0x00400000 + +#define PTP_SIZE SIZE_4KB + +#define IA32_PG_P (1 << 0) +#define IA32_PG_RW (1 << 1) +#define IA32_PG_PS (1 << 7) + +#define STM_PAGE_SHIFT 12 +#define STM_PAGE_MASK 0xFFF +#define STM_SIZE_TO_PAGES(a) \ + (((a) >> STM_PAGE_SHIFT) + (((a)&STM_PAGE_MASK) ? 1 : 0)) +#define STM_PAGES_TO_SIZE(a) ((a) << STM_PAGE_SHIFT) + +#define STM_ACCESS_DENIED 15 +#define STM_UNSUPPORTED 3 + +#define STM_BUFFER_TOO_SMALL 1 + +#define STM_SM_MONITOR_STATE_ENABLED 1 + +typedef struct { + + uint64_t vmcs_revision_id : 31; + uint64_t always_zero : 1; + uint64_t vmcs_size : 13; + uint64_t reserved1 : 3; + uint64_t vmxon_add_width : 1; + uint64_t stm_supported : 1; + uint64_t vmcs_memory_type : 4; + uint64_t in_out_reporting : 1; + uint64_t may_clear_defaults : 1; + uint64_t reserved2 : 8; +} VMX_BASIC_MSR_BITS; + +typedef union { + VMX_BASIC_MSR_BITS bits; + uint64_t uint64; + msr_t msr; +} VMX_BASIC_MSR; + +typedef struct { + uint64_t valid : 1; + uint64_t reserved1 : 1; + uint64_t vmx_off_blockSmi : 1; + uint64_t reserved2 : 9; + uint64_t mseg_address : 20; + uint64_t reserved3 : 32; +} SMM_MONITOR_CTL_MSR_BITS; + +extern struct mp_state { + struct mp_ops ops; + int cpu_count; + uintptr_t perm_smbase; + size_t perm_smsize; + size_t smm_save_state_size; + int do_smm; +} mp_state; + +typedef union { + SMM_MONITOR_CTL_MSR_BITS bits; + uint64_t uint64; + msr_t msr; +} SMM_MONITOR_CTL_MSR; + +// Template of STM_RSC_END structure for copying. + +STM_RSC_END m_rsc_end_node = { + {END_OF_RESOURCES, sizeof(STM_RSC_END)}, +}; + +uint8_t *m_stm_resources_ptr = NULL; +uint32_t m_stm_resource_total_size = 0x0; +uint32_t m_stm_resource_size_used = 0x0; +uint32_t m_stm_resource_size_available = 0x0; + +uint8_t *stm_resource_heap = NULL; + +uint32_t m_stm_state = 0; + +/* + * Handle single Resource to see if it can be merged into Record. + * + * @param resource A pointer to resource node to be added + * @param record A pointer to record node to be merged + * + * @retval true resource handled + * @retval false resource is not handled + */ + +static bool handle_single_resource(STM_RSC *resource, STM_RSC *record) +{ + uint64_t resource_lo = 0; + uint64_t resource_hi = 0; + uint64_t record_lo = 0; + uint64_t record_hi = 0; + + // Calling code is responsible for making sure that + // Resource->Header.RscType == (*Record)->Header.RscType + // thus we use just one of them as switch variable. + + switch (resource->header.rsc_type) { + case MEM_RANGE: + case MMIO_RANGE: + resource_lo = resource->mem.base; + resource_hi = resource->mem.base + resource->mem.length; + record_lo = record->mem.base; + record_hi = record->mem.base + record->mem.length; + if (resource->mem.rwx_attributes + != record->mem.rwx_attributes) { + if ((resource_lo == record_lo) + && (resource_hi == record_hi)) { + record->mem.rwx_attributes = + resource->mem.rwx_attributes + | record->mem.rwx_attributes; + return true; + } else { + return false; + } + } + break; + case IO_RANGE: + case TRAPPED_IO_RANGE: + resource_lo = (uint64_t)resource->io.base; + resource_hi = (uint64_t)resource->io.base + + (uint64_t)resource->io.length; + record_lo = (uint64_t)record->io.base; + record_hi = + (uint64_t)record->io.base + (uint64_t)record->io.length; + break; + case PCI_CFG_RANGE: + if ((resource->pci_cfg.originating_bus_number + != record->pci_cfg.originating_bus_number) + || (resource->pci_cfg.last_node_index + != record->pci_cfg.last_node_index)) + return false; + + if (memcmp(resource->pci_cfg.pci_device_path, + record->pci_cfg.pci_device_path, + sizeof(STM_PCI_DEVICE_PATH_NODE) + * (resource->pci_cfg.last_node_index + 1)) + != 0) { + return false; + } + resource_lo = (uint64_t)resource->pci_cfg.base; + resource_hi = (uint64_t)resource->pci_cfg.base + + (uint64_t)resource->pci_cfg.length; + record_lo = (uint64_t)record->pci_cfg.base; + record_hi = (uint64_t)record->pci_cfg.base + + (uint64_t)record->pci_cfg.length; + if (resource->pci_cfg.rw_attributes + != record->pci_cfg.rw_attributes) { + if ((resource_lo == record_lo) + && (resource_hi == record_hi)) { + record->pci_cfg.rw_attributes = + resource->pci_cfg.rw_attributes + | record->pci_cfg.rw_attributes; + return true; + } else { + return false; + } + } + break; + case MACHINE_SPECIFIC_REG: + + // Special case - merge MSR masks in place. + if (resource->msr.msr_index != record->msr.msr_index) + return false; + record->msr.read_mask |= resource->msr.read_mask; + record->msr.write_mask |= resource->msr.write_mask; + return true; + default: + return false; + } + + // If resources are disjoint + if ((resource_hi < record_lo) || (resource_lo > record_hi)) + return false; + + // If resource is consumed by record. + if ((resource_lo >= record_lo) && (resource_hi <= record_hi)) + return true; + + // Resources are overlapping. + // Resource and record are merged. + resource_lo = (resource_lo < record_lo) ? resource_lo : record_lo; + resource_hi = (resource_hi > record_hi) ? resource_hi : record_hi; + + switch (resource->header.rsc_type) { + case MEM_RANGE: + case MMIO_RANGE: + record->mem.base = resource_lo; + record->mem.length = resource_hi - resource_lo; + break; + case IO_RANGE: + case TRAPPED_IO_RANGE: + record->io.base = (uint64_t)resource_lo; + record->io.length = (uint64_t)(resource_hi - resource_lo); + break; + case PCI_CFG_RANGE: + record->pci_cfg.base = (uint64_t)resource_lo; + record->pci_cfg.length = (uint64_t)(resource_hi - resource_lo); + break; + default: + return false; + } + + return true; +} + +/* + * Add resource node. + * + * @param Resource A pointer to resource node to be added + */ +static void add_single_resource(STM_RSC *resource) +{ + STM_RSC *record; + + record = (STM_RSC *)m_stm_resources_ptr; + + while (true) { + if (record->header.rsc_type == END_OF_RESOURCES) + break; + + // Go to next record if resource and record types don't match. + if (resource->header.rsc_type != record->header.rsc_type) { + record = (STM_RSC *)((void *)record + + record->header.length); + continue; + } + + // Record is handled inside of procedure - don't adjust. + if (handle_single_resource(resource, record)) + return; + record = (STM_RSC *)((void *)record + record->header.length); + } + + // Add resource to the end of area. + memcpy(m_stm_resources_ptr + m_stm_resource_size_used + - sizeof(m_rsc_end_node), + resource, resource->header.length); + memcpy(m_stm_resources_ptr + m_stm_resource_size_used + - sizeof(m_rsc_end_node) + resource->header.length, + &m_rsc_end_node, sizeof(m_rsc_end_node)); + m_stm_resource_size_used += resource->header.length; + m_stm_resource_size_available = + m_stm_resource_total_size - m_stm_resource_size_used; +} + +/* + * Add resource list. + * + * @param resource_list A pointer to resource list to be added + * @param num_entries Optional number of entries. + * If 0, list must be terminated by END_OF_RESOURCES. + */ +static void add_resource(STM_RSC *resource_list, uint32_t num_entries) +{ + uint32_t count; + uint32_t index; + STM_RSC *resource; + + if (num_entries == 0) + count = 0xFFFFFFFF; + else + count = num_entries; + + resource = resource_list; + + for (index = 0; index < count; index++) { + if (resource->header.rsc_type == END_OF_RESOURCES) + return; + add_single_resource(resource); + resource = + (STM_RSC *)((void *)resource + resource->header.length); + } +} + +/* + * Validate resource list. + * + * @param resource_list A pointer to resource list to be added + * @param num_entries Optional number of entries. + * If 0, list must be terminated by END_OF_RESOURCES. + * + * @retval true resource valid + * @retval false resource invalid + */ +static bool validate_resource(STM_RSC *resource_list, uint32_t num_entries) +{ + uint32_t count; + uint32_t index; + STM_RSC *resource; + uint32_t sub_index; + + // If NumEntries == 0 make it very big. Scan will be terminated by + // END_OF_RESOURCES. + if (num_entries == 0) + count = 0xFFFFFFFF; + else + count = num_entries; + + // Start from beginning of resource list. + resource = resource_list; + + for (index = 0; index < count; index++) { + printk(BIOS_DEBUG, "STM: %s (%u) - RscType(%x) length(0x%x)\n", + __func__, + index, + resource->header.rsc_type, + resource->header.length); + // Validate resource. + switch (resource->header.rsc_type) { + case END_OF_RESOURCES: + if (resource->header.length != sizeof(STM_RSC_END)) + return false; + + // If we are passed actual number of resources to add, + // END_OF_RESOURCES structure between them is considered + // an error. If NumEntries == 0 END_OF_RESOURCES is a + // termination. + if (num_entries != 0) + return false; + + // If NumEntries == 0 and list reached end - return + // success. + return true; + + case MEM_RANGE: + case MMIO_RANGE: + printk(BIOS_DEBUG, + "STM: %s - MEM (0x%0llx, 0x%0llx)\n", + __func__, + resource->mem.base, + resource->mem.length); + + if (resource->header.length != sizeof(STM_RSC_MEM_DESC)) + return false; + + if (resource->mem.rwx_attributes > FULL_ACCS) + return false; + break; + + case IO_RANGE: + case TRAPPED_IO_RANGE: + if (resource->header.length != sizeof(STM_RSC_IO_DESC)) + return false; + + if ((resource->io.base + resource->io.length) > 0xFFFF) + return false; + break; + + case PCI_CFG_RANGE: + printk(BIOS_DEBUG, + "STM: %s - PCI (0x%02x, 0x%08x, 0x%02x, 0x%02x)\n", + __func__, + resource->pci_cfg.originating_bus_number, + resource->pci_cfg.last_node_index, + resource->pci_cfg.pci_device_path[0].pci_device, + resource->pci_cfg.pci_device_path[0] + .pci_function); + if (resource->header.length + != sizeof(STM_RSC_PCI_CFG_DESC) + + (sizeof(STM_PCI_DEVICE_PATH_NODE) + * resource->pci_cfg.last_node_index)) + return false; + for (sub_index = 0; + sub_index <= resource->pci_cfg.last_node_index; + sub_index++) { + if ((resource->pci_cfg + .pci_device_path[sub_index] + .pci_device + > 0x1F) + || (resource->pci_cfg + .pci_device_path[sub_index] + .pci_function + > 7)) + return false; + } + if ((resource->pci_cfg.base + resource->pci_cfg.length) + > 0x1000) + return false; + break; + + case MACHINE_SPECIFIC_REG: + if (resource->header.length != sizeof(STM_RSC_MSR_DESC)) + return false; + break; + + default: + printk(BIOS_DEBUG, "STM: %s - Unknown RscType(%x)\n", + __func__, resource->header.rsc_type); + return false; + } + resource = + (STM_RSC *)((void *)resource + resource->header.length); + } + return true; +} + +/* + * Get resource list. + * EndResource is excluded. + * + * @param resou rce_list A pointer to resource list to be added + * @param num_entries Optional number of entries. + * If 0, list must be terminated by END_OF_RESOURCES. + * + * @retval true resource valid + * @retval false resource invalid + */ +static uint32_t get_resource_size(STM_RSC *resource_list, uint32_t num_entries) +{ + uint32_t count; + uint32_t index; + STM_RSC *resource; + + resource = resource_list; + + // If NumEntries == 0 make it very big. Scan will be terminated by + // END_OF_RESOURCES. + if (num_entries == 0) + count = 0xFFFFFFFF; + else + count = num_entries; + + // Start from beginning of resource list. + resource = resource_list; + + for (index = 0; index < count; index++) { + if (resource->header.rsc_type == END_OF_RESOURCES) + break; + resource = + (STM_RSC *)((void *)resource + resource->header.length); + } + return (uint32_t)((uint32_t)resource - (uint32_t)resource_list); +} + +/* + * Add resources in list to database. Allocate new memory areas as needed. + * + * @param resource_list A pointer to resource list to be added + * @param num_entries Optional number of entries. + * If 0, list must be terminated by END_OF_RESOURCES. + * + * @retval SUCCESS If resources are added + * @retval INVALID_PARAMETER If nested procedure detected resource failure + * @retval OUT_OF_RESOURCES If nested procedure returned it and we cannot + * allocate more areas. + */ +int add_pi_resource(STM_RSC *resource_list, uint32_t num_entries) +{ + size_t resource_size; + + printk(BIOS_DEBUG, "STM: %s - Enter\n", __func__); + + if (!validate_resource(resource_list, num_entries)) + return -1; // INVALID_PARAMETER; + + resource_size = get_resource_size(resource_list, num_entries); + printk(BIOS_DEBUG, "STM: ResourceSize - 0x%08lx\n", resource_size); + if (resource_size == 0) + return -1; // INVALID_PARAMETER; + + if (m_stm_resources_ptr == NULL) { + + // Copy EndResource for initialization + m_stm_resources_ptr = stm_resource_heap; + m_stm_resource_total_size = CONFIG_BIOS_RESOURCE_LIST_SIZE; + memset(m_stm_resources_ptr, 0, CONFIG_BIOS_RESOURCE_LIST_SIZE); + + memcpy(m_stm_resources_ptr, &m_rsc_end_node, + sizeof(m_rsc_end_node)); + m_stm_resource_size_used = sizeof(m_rsc_end_node); + m_stm_resource_size_available = + m_stm_resource_total_size - sizeof(m_rsc_end_node); + wbinvd(); // force to memory + + } else { + if (m_stm_resource_size_available < resource_size) { + printk(BIOS_DEBUG, + "STM: ERROR - not enough space for SMM resource list\n"); + return -1; // OUT_OF_RESOURCES + } + } + + // Check duplication + add_resource(resource_list, num_entries); + + return 0; // SUCCESS; +} + +/* + * Delete resources in list to database. + * + * @param resource_list A pointer to resource list to be deleted + * NULL means delete all resources. + * @param num_entries Optional number of entries. + * If 0, list must be terminated by END_OF_RESOURCES. + * + * @retval SUCCESS If resources are deleted + * @retval INVALID_PARAMETER If nested procedure detected resource failure + */ +int32_t delete_pi_resource(STM_RSC *resource_list, uint32_t num_entries) +{ + if (resource_list != NULL) { + // ASSERT (false); + return -1; // UNSUPPORTED; + } + + // Delete all + memcpy(m_stm_resources_ptr, &m_rsc_end_node, sizeof(m_rsc_end_node)); + m_stm_resource_size_used = sizeof(m_rsc_end_node); + m_stm_resource_size_available = + m_stm_resource_total_size - sizeof(m_rsc_end_node); + return 0; // SUCCESS; +} + +/* + * Get BIOS resources. + * + * @param resource_list A pointer to resource list to be filled + * @param resource_size On input it means size of resource list input. + * On output it means size of resource list filled, + * or the size of resource list to be filled if size is + * too small. + * + * @retval SUCCESS If resources are returned. + * @retval BUFFER_TOO_SMALL If resource list buffer is too small to hold + * the whole resource list. + */ +int32_t get_pi_resource(STM_RSC *resource_list, uint32_t *resource_size) +{ + if (*resource_size < m_stm_resource_size_used) { + *resource_size = (uint32_t)m_stm_resource_size_used; + return -1; // BUFFER_TOO_SMALL; + } + + memcpy(resource_list, m_stm_resources_ptr, m_stm_resource_size_used); + *resource_size = (uint32_t)m_stm_resource_size_used; + return 0; // SUCCESS; +} + +/* + * Get 4K page aligned VMCS size. + * @return 4K page aligned VMCS size + */ +static uint32_t get_vmcs_size(void) +{ + uint32_t this_vmcs_size; + VMX_BASIC_MSR msr_data64; + int stm_support; + + msr_data64.msr = rdmsr(IA32_VMX_BASIC_MSR); + + this_vmcs_size = msr_data64.bits.vmcs_size; + stm_support = msr_data64.bits.stm_supported; + printk(BIOS_DEBUG, "STM: %s: Size %d StmSupport %d\n", __func__, + this_vmcs_size, stm_support); + + // VMCS require 0x1000 alignment + this_vmcs_size = STM_PAGES_TO_SIZE(STM_SIZE_TO_PAGES(this_vmcs_size)); + + return this_vmcs_size; +} + +/* + * Create 4G page table for STM. + * 2M PTEs for x86_64 or 2M PTEs for x86_32. + * + * @param pageable_base The page table base in MSEG + */ +void stm_gen_4g_pagetable_x64(uint32_t pagetable_base) +{ + uint32_t index; + uint32_t sub_index; + uint64_t *pde; + uint64_t *pte; + uint64_t *pml4; + + pml4 = (uint64_t *)(uint32_t)pagetable_base; + pagetable_base += PTP_SIZE; + *pml4 = pagetable_base | IA32_PG_RW | IA32_PG_P; + + pde = (uint64_t *)(uint32_t)pagetable_base; + pagetable_base += PTP_SIZE; + pte = (uint64_t *)(uint32_t)pagetable_base; + + for (index = 0; index < 4; index++) { + *pde = pagetable_base | IA32_PG_RW | IA32_PG_P; + pde++; + pagetable_base += PTP_SIZE; + + for (sub_index = 0; sub_index < SIZE_4KB / sizeof(*pte); + sub_index++) { + *pte = (((index << 9) + sub_index) << 21) | IA32_PG_PS + | IA32_PG_RW | IA32_PG_P; + pte++; + } + } +} + +/* + * Check STM image size. + * + * @param stm_image STM image + * @param stm_imageSize STM image size + * + * @retval true check pass + * @retval false check fail + */ + +bool stm_check_stm_image(void *stm_image, uint32_t stm_imagesize) +{ + uint32_t min_mseg_size; + STM_HEADER *stm_header; + + stm_header = (STM_HEADER *)stm_image; + + // Get Minimal required Mseg size + min_mseg_size = (STM_PAGES_TO_SIZE(STM_SIZE_TO_PAGES( + stm_header->sw_stm_hdr.static_image_size)) + + stm_header->sw_stm_hdr.additional_dynamic_memory_size + + (stm_header->sw_stm_hdr.per_proc_dynamic_memory_size + + get_vmcs_size() * 2) + * mp_state.cpu_count); + if (min_mseg_size < stm_imagesize) + min_mseg_size = stm_imagesize; + + if (stm_header->hw_stm_hdr.cr3_offset + >= stm_header->sw_stm_hdr.static_image_size) { + + // We will create page table, just in case that SINIT does not + // create it. + if (min_mseg_size < stm_header->hw_stm_hdr.cr3_offset + + STM_PAGES_TO_SIZE(6)) { + min_mseg_size = stm_header->hw_stm_hdr.cr3_offset + + STM_PAGES_TO_SIZE(6); + } + } + + // Check if it exceeds MSEG size + if (min_mseg_size > CONFIG_MSEG_SIZE) + return false; + + return true; +} + +/* + * This function return BIOS STM resource. + * Produced by SmmStm. + * Comsumed by SmmMpService when Init. + * + * @return BIOS STM resource + */ +void *get_stm_resource(void) +{ + return m_stm_resources_ptr; +} diff --git a/src/security/intel/stm/SmmStm.h b/src/security/intel/stm/SmmStm.h new file mode 100644 index 0000000..4f72816 --- /dev/null +++ b/src/security/intel/stm/SmmStm.h @@ -0,0 +1,120 @@ +/* @file + * SMM STM support + * + * Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. + * This program and the accompanying materials are licensed and made + * available under the terms and conditions of the BSD License which + * accompanies this distribution. The full text of the license may + * be found at http://opensource.org/licenses/bsd-license.php. + * + * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED + * + */ + +#ifndef _SMM_STM_H_ +#define _SMM_STM_H_ + +#include <cpu/x86/msr.h> +#include "StmApi.h" + +/* + * Load STM image. + * + * @retval SUCCESS STM is loaded to MSEG + * @retval BUFFER_TOO_SMALL MSEG is too small + * @retval UNSUPPORTED MSEG is not enabled + */ +int load_stm_image(uintptr_t mseg); + +void stm_setup( + uintptr_t mseg, int cpu, int num_cpus, uintptr_t smbase, + uintptr_t smbase_base, uint32_t offset32); + +/* + * Add resources in list to database. Allocate new memory areas as needed. + * + * @param resource_list A pointer to resource list to be added + * @param num_entries Optional number of entries. + * If 0, list must be terminated by END_OF_RESOURCES. + * + * @retval SUCCESS If resources are added + * @retval INVALID_PARAMETER If nested procedure detected resource failure + * @retval OUT_OF_RESOURCES If nested procedure returned it and we cannot + * allocate more areas. + */ +int add_pi_resource(STM_RSC *resource_list, uint32_t num_entries); + +/* + * Delete resources in list to database. + * + * @param resource_list A pointer to resource list to be deleted + * NULL means delete all resources. + * @param num_entries Optional number of entries. + * If 0, list must be terminated by END_OF_RESOURCES. + * + * @retval SUCCESS If resources are deleted + * @retval NVALID_PARAMETER If nested procedure detected resource fail + */ +int delete_pi_resource(STM_RSC *resource_list, uint32_t num_entries); + +/* + * Get BIOS resources. + * + * @param resource_list A pointer to resource list to be filled + * @param resource_size On input it means size of resource list input. + * On output it means size of resource list filled, + * or the size of resource list to be filled if + * size is too small. + * + * @retval SUCCESS If resources are returned. + * @retval BUFFER_TOO_SMALL If resource list buffer is too small to + * hold the whole resources. + */ +int get_pi_resource(STM_RSC *resource_list, uint32_t *resource_size); + +/* + * This function notifies the STM of a resource change. + * + * @param stm_resource BIOS STM resource + */ +void notify_stm_resource_change(void *stm_resource); + +/* + * This function returns the pointer to the STM BIOS resource list. + * + * @return BIOS STM resource + */ +void *get_stm_resource(void); + +void setup_smm_descriptor(void *smbase, void *base_smbase, int32_t apic_id, + int32_t entry32_off); + +/* + * Check STM image size. + * + * @param stm_image STM image + * @param stm_image_size STM image size + * + * @retval true check pass + * @retval false check fail + */ +bool stm_check_stm_image(void *stm_image, uint32_t stm_image_size); + +/* + * Create 4G page table for STM. + * 4M Non-PAE page table in IA32 version. + * + * @param page_table_base The page table base in MSEG + */ +void stm_gen_4g_pagetable_ia32(uint32_t pagetable_base); + +/* + * Create 4G page table for STM. + * 2M PAE page table in X64 version. + * + * @param pagetable_base The page table base in MSEG + */ +void stm_gen_4g_pagetable_x64(uint32_t pagetable_base); + +#endif diff --git a/src/security/intel/stm/StmApi.h b/src/security/intel/stm/StmApi.h new file mode 100644 index 0000000..342ceea --- /dev/null +++ b/src/security/intel/stm/StmApi.h @@ -0,0 +1,726 @@ +/* @file + * STM API definition + * + * Copyright (c) 2015, Intel Corporation. All rights reserved. + * This program and the accompanying materials are licensed and made available + * under the terms and conditions of the BSD License which accompanies this + * distribution. The full text of the license may be found at + * http://opensource.org/licenses/bsd-license.php. + * + * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, + * EITHER EXPRESS OR IMPLIED. + * + */ + +#ifndef _STM_API_H_ +#define _STM_API_H_ + +#include <stdint.h> + +// definition in STM spec + +#define STM_SPEC_VERSION_MAJOR 1 +#define STM_SPEC_VERSION_MINOR 0 + +#pragma pack(push, 1) + +#define STM_HARDWARE_FIELD_FILL_TO_2K (2048 - sizeof(uint32_t) * 8) +typedef struct { + uint32_t stm_header_revision; + uint32_t monitor_features; + uint32_t gdtr_limit; + uint32_t gdtr_base_offset; + uint32_t cs_selector; + uint32_t eip_offset; + uint32_t esp_offset; + uint32_t cr3_offset; + uint8_t reserved[STM_HARDWARE_FIELD_FILL_TO_2K]; +} HARDWARE_STM_HEADER; + +#define STM_FEATURES_IA32E 0x1 + +typedef struct { + uint32_t intel_64mode_supported : 1; + uint32_t ept_supported : 1; + uint32_t mbz : 30; +} STM_FEAT; + +typedef struct { + uint8_t stm_spec_ver_major; + uint8_t stm_pec_ver_minor; + uint16_t mbz; + uint32_t static_image_size; + uint32_t per_proc_dynamic_memory_size; + uint32_t additional_dynamic_memory_size; + STM_FEAT stm_features; + uint32_t number_of_rev_ids; + uint32_t stm_smm_rev_id[1]; + + // The total STM_HEADER should be 4K. +} SOFTWARE_STM_HEADER; + +typedef struct { + HARDWARE_STM_HEADER hw_stm_hdr; + SOFTWARE_STM_HEADER sw_stm_hdr; +} STM_HEADER; + +#define SHA1 1 +#define SHA256 2 +typedef struct { + uint64_t bios_component_base; + uint32_t image_size; + uint32_t hash_algorithm; // SHA1 or SHA256 + uint8_t hash[32]; +} TXT_BIOS_COMPONENT_STATUS; + +#define PAGE_SIZE 4096 +typedef struct { + uint32_t image_size; + uint32_t reserved; + uint64_t image_page_base[1]; //[NumberOfPages]; +} TXT_BIOS_COMPONENT_UPDATE; + +typedef struct { + uint64_t spe_rip; + uint64_t spe_rsp; + uint16_t spe_ss; + uint16_t page_violation_exception : 1; + uint16_t msr_violation_exception : 1; + uint16_t register_violation_exception : 1; + uint16_t io_violation_exception : 1; + uint16_t pci_violation_exception : 1; + uint16_t reserved1 : 11; + uint32_t reserved2; +} STM_PROTECTION_EXCEPTION_HANDLER; + +typedef struct { + uint8_t execution_disable_outside_smrr : 1; + uint8_t intel_64mode : 1; + uint8_t cr4_pae : 1; + uint8_t cr4_pse : 1; + uint8_t reserved1 : 4; +} STM_SMM_ENTRY_STATE; + +typedef struct { + uint8_t smram_to_vmcs_restore_required : 1; // BIOS restore hint + uint8_t reinitialize_vmcs_required : 1; // BIOS request + uint8_t reserved2 : 6; +} STM_SMM_RESUME_STATE; + +typedef struct { + uint8_t domain_type : 4; // STM input to BIOS on each SM + uint8_t x_state_policy : 2; // STM input to BIOS on each SMI + uint8_t ept_enabled : 1; + uint8_t reserved3 : 1; +} STM_SMM_STATE; + +typedef struct { + uint64_t signature; + uint16_t size; + uint8_t smm_descriptor_ver_major; + uint8_t smm_descriptor_ver_minor; + uint32_t local_apic_id; + STM_SMM_ENTRY_STATE smm_entry_state; + STM_SMM_RESUME_STATE smm_resume_state; + STM_SMM_STATE stm_smm_state; + uint8_t reserved4; + uint16_t smm_cs; + uint16_t smm_ds; + uint16_t smm_ss; + uint16_t smm_other_segment; + uint16_t smm_tr; + uint16_t reserved5; + uint64_t smm_cr3; + uint64_t smm_stm_setup_rip; + uint64_t smm_stm_teardown_rip; + uint64_t smm_smi_handler_rip; + uint64_t smm_smi_handler_rsp; + uint64_t smm_gdt_ptr; + uint32_t smm_gdt_size; + uint32_t required_stm_smm_rev_id; + STM_PROTECTION_EXCEPTION_HANDLER stm_protection_exception_handler; + uint64_t reserved6; + uint64_t bios_hw_resource_requirements_ptr; + // extend area + uint64_t acpi_rsdp; + uint8_t physical_address_bits; +} TXT_PROCESSOR_SMM_DESCRIPTOR; + +#define TXT_PROCESSOR_SMM_DESCRIPTOR_SIGNATURE "TXTPSSIG" +#define TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MAJOR 1 +#define TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MINOR 0 + +#define SMM_PSD_OFFSET 0xfb00 + +typedef enum { + TxtSmmPageViolation = 1, + TxtSmmMsrViolation, + TxtSmmRegisterViolation, + TxtSmmIoViolation, + TxtSmmPciViolation +} TXT_SMM_PROTECTION_EXCEPTION_TYPE; + +typedef struct { + uint32_t rdi; + uint32_t rsi; + uint32_t rbp; + uint32_t rdx; + uint32_t rcx; + uint32_t rbx; + uint32_t rax; + uint32_t cr3; + uint32_t cr2; + uint32_t cr0; + uint32_t vmcs_exit_instruction_info; + uint32_t vmcs_exit_instruction_length; + uint64_t vmcs_exit_qualification; + uint32_t error_code; // TXT_SMM_PROTECTION_EXCEPTION_TYPE + uint32_t rip; + uint32_t cs; + uint32_t rflags; + uint32_t rsp; + uint32_t ss; +} STM_PROTECTION_EXCEPTION_STACK_FRAME_IA32; + +typedef struct { + uint64_t r15; + uint64_t r14; + uint64_t r13; + uint64_t r12; + uint64_t r11; + uint64_t r10; + uint64_t r9; + uint64_t r8; + uint64_t rdi; + uint64_t rsi; + uint64_t rbp; + uint64_t rdx; + uint64_t rcx; + uint64_t rbx; + uint64_t rax; + uint64_t cr8; + uint64_t cr3; + uint64_t cr2; + uint64_t cr0; + uint64_t vmcs_exit_instruction_info; + uint64_t vmcs_exit_instruction_length; + uint64_t vmcs_exit_qualification; + uint64_t error_code; // TXT_SMM_PROTECTION_EXCEPTION_TYPE + uint64_t rip; + uint64_t cs; + uint64_t rflags; + uint64_t rsp; + uint64_t ss; +} STM_PROTECTION_EXCEPTION_STACK_FRAME_X64; + +typedef union { + STM_PROTECTION_EXCEPTION_STACK_FRAME_IA32 *ia32_stack_frame; + STM_PROTECTION_EXCEPTION_STACK_FRAME_X64 *x64_stack_frame; +} STM_PROTECTION_EXCEPTION_STACK_FRAME; + +#define STM_SMM_REV_ID 0x80010100 + +typedef struct _STM_SMM_CPU_STATE { // Writable? + uint8_t reserved1[0x1d0]; // fc00h + uint32_t gdt_base_hi_dword; // fdd0h : NO + uint32_t ldt_base_hi_dword; // fdd4h : NO + uint32_t idt_base_hi_dword; // fdd8h : NO + uint8_t reserved2[0x4]; // fddch + uint64_t io_rdi; // fde0h : NO + // - restricted + uint64_t io_eip; // fde8h : YES + uint64_t io_rcx; // fdf0h : NO + // - restricted + uint64_t io_rsi; // fdf8h : NO + // - restricted + uint8_t reserved3[0x40]; // fe00h + uint32_t cr4; // fe40h : NO + uint8_t reserved4[0x48]; // fe44h + uint32_t gdt_base_lo_dword; // fe8ch : NO + uint32_t gdt_limit; // fe90h : NO + // - RESTRICTED + uint32_t idt_base_lo_dword; // fe94h : NO + uint32_t idt_limit; // fe98h : NO + // - RESTRICTED + uint32_t ldt_base_lo_dword; // fe9ch : NO + uint32_t ldt_limit; // fea0h : NO + // - RESTRICTED + uint32_t ldt_info; // fea4h : NO + // - RESTRICTED + uint8_t reserved5[0x30]; // fea8h + uint64_t eptp; // fed8h : NO + uint32_t enabled_ept; // fee0h : NO + uint8_t reserved6[0x14]; // fee4h + uint32_t smbase; // fef8h : YES + // - NO for STM + uint32_t smm_rev_id; // fefch : NO + uint16_t io_restart; // ff00h : YES + uint16_t auto_halt_restart; // ff02h : YES + uint8_t reserved7[0x18]; // ff04h + uint64_t r15; // ff1ch : YES + uint64_t r14; // ff24h : YES + uint64_t r13; // ff2ch : YES + uint64_t r12; // ff34h : YES + uint64_t r11; // ff3ch : YES + uint64_t r10; // ff44h : YES + uint64_t r9; // ff4ch : YES + uint64_t r8; // ff54h : YES + uint64_t rax; // ff5ch : YES + uint64_t rcx; // ff64h : YES + uint64_t rdx; // ff6ch : YES + uint64_t rbx; // ff74h : YES + uint64_t rsp; // ff7ch : YES + uint64_t rbp; // ff84h : YES + uint64_t rsi; // ff8ch : YES + uint64_t rdi; // ff94h : YES + uint64_t io_mem_addr; // ff9ch : NO + uint32_t io_misc; // ffa4h : NO + uint32_t es; // ffa8h : NO + uint32_t cs; // ffach : NO + uint32_t ss; // ffb0h : NO + uint32_t ds; // ffb4h : NO + uint32_t fs; // ffb8h : NO + uint32_t gs; // ffbch : NO + uint32_t ldtr; // ffc0h : NO + uint32_t tr; // ffc4h : NO + uint64_t dr7; // ffc8h : NO + uint64_t dr6; // ffd0h : NO + uint64_t rip; // ffd8h : YES + uint64_t ia32_efer; // ffe0h : YES + // - NO for STM + uint64_t rflags; // ffe8h : YES + uint64_t cr3; // fff0h : NO + uint64_t cr0; // fff8h : NO +} STM_SMM_CPU_STATE; + +// STM Mapping +typedef struct { + uint64_t physical_address; + uint64_t virtual_ddress; + uint32_t Page_count; + uint32_t Pat_cache_type; +} STM_MAP_ADDRESS_RANGE_DESCRIPTOR; + +#define ST_UC 0x00 +#define WC 0x01 +#define WT 0x04 +#define WP 0x05 +#define WB 0x06 +#define UC 0x07 +#define FOLLOW_MTRR 0xFFFFFFFF + +typedef struct { + uint64_t virtual_address; + uint32_t length; +} STM_UNMAP_ADDRESS_RANGE_DESCRIPTOR; + +typedef struct { + uint64_t interrupted_guest_virtual_address; + uint32_t length; + uint64_t interrupted_cr3; + uint64_t interrupted_eptp; + uint32_t map_to_smm_guest : 2; + uint32_t interrupted_cr4_pae : 1; + uint32_t interrupted_cr4_pse : 1; + uint32_t interrupted_ia32e_mode : 1; + uint32_t reserved1 : 27; + uint32_t reserved2; + uint64_t physical_address; + uint64_t smm_guest_virtual_address; +} STM_ADDRESS_LOOKUP_DESCRIPTOR; + +#define DO_NOT_MAP 0 +#define ONE_TO_ONE 1 +#define VIRTUAL_ADDRESS_SPECIFIED 3 + +// STM_RESOURCE_LIST +#define END_OF_RESOURCES 0 +#define MEM_RANGE 1 +#define IO_RANGE 2 +#define MMIO_RANGE 3 +#define MACHINE_SPECIFIC_REG 4 +#define PCI_CFG_RANGE 5 +#define TRAPPED_IO_RANGE 6 +#define ALL_RESOURCES 7 +#define REGISTER_VIOLATION 8 +#define MAX_DESC_TYPE 8 + +typedef struct { + uint32_t rsc_type; + uint16_t length; + uint16_t return_status : 1; + uint16_t reserved : 14; + uint16_t ignore_resource : 1; +} STM_RSC_DESC_HEADER; + +typedef struct { + STM_RSC_DESC_HEADER Hdr; + uint64_t resource_list_continuation; +} STM_RSC_END; + +// byte granular Memory range support +#define STM_RSC_BGM 0x4 + +typedef struct { + STM_RSC_DESC_HEADER hdr; + uint64_t base; + uint64_t length; + uint32_t rwx_attributes : 3; + uint32_t reserved : 29; + uint32_t reserved_2; +} STM_RSC_MEM_DESC; + +#define STM_RSC_MEM_R 0x1 +#define STM_RSC_MEM_W 0x2 +#define STM_RSC_MEM_X 0x4 + +typedef struct { + STM_RSC_DESC_HEADER hdr; + uint16_t base; + uint16_t length; + uint32_t reserved; +} STM_RSC_IO_DESC; + +// byte granular MMIO range support +#define STM_RSC_BGI 0x2 + +typedef struct { + STM_RSC_DESC_HEADER hdr; + uint64_t base; + uint64_t length; + uint32_t rwx_attributes : 3; + uint32_t reserved : 29; + uint32_t reserved_2; +} STM_RSC_MMIO_DESC; + +#define STM_RSC_MMIO_R 0x1 +#define STM_RSC_MMIO_W 0x2 +#define STM_RSC_MMIO_X 0x4 + +typedef struct { + STM_RSC_DESC_HEADER hdr; + uint32_t msr_index; + uint32_t kernel_mode_processing : 1; + uint32_t reserved : 31; + uint64_t read_mask; + uint64_t write_mask; +} STM_RSC_MSR_DESC; + +// bit granular MSR resource support +#define STM_RSC_MSR 0x8 + +typedef struct { + uint8_t type; // must be 1, indicating Hardware Device Path + uint8_t subtype; // must be 1, indicating PCI + uint16_t length; // sizeof(STM_PCI_DEVICE_PATH_NODE) which is 6 + uint8_t pci_function; + uint8_t pci_device; +} STM_PCI_DEVICE_PATH_NODE; + +typedef struct { + STM_RSC_DESC_HEADER hdr; + uint16_t rw_attributes : 2; + uint16_t reserved : 14; + uint16_t base; + uint16_t length; + uint8_t originating_bus_number; + uint8_t last_node_index; + STM_PCI_DEVICE_PATH_NODE pci_device_path[1]; + // STM_PCI_DEVICE_PATH_NODE PciDevicePath[LastNodeIndex + 1]; +} STM_RSC_PCI_CFG_DESC; + +#define STM_RSC_PCI_CFG_R 0x1 +#define STM_RSC_PCI_CFG_W 0x2 + +typedef struct { + STM_RSC_DESC_HEADER hdr; + uint16_t base; + uint16_t length; + uint16_t in : 1; + uint16_t out : 1; + uint16_t api : 1; + uint16_t reserved1 : 13; + uint16_t reserved2; +} STM_RSC_TRAPPED_IO_DESC; + +typedef struct { + STM_RSC_DESC_HEADER hdr; +} STM_RSC_ALL_RESOURCES_DESC; + +typedef struct { + STM_RSC_DESC_HEADER hdr; + uint32_t register_type; + uint32_t reserved; + uint64_t readMask; + uint64_t write_mask; +} STM_REGISTER_VIOLATION_DESC; + +typedef enum { + stm_register_cr0, + stm_register_cr2, + stm_register_cr3, + stm_register_cr4, + stm_register_cr8, + stm_register_max, +} STM_REGISTER_VIOLATION_TYPE; + +typedef union { + STM_RSC_DESC_HEADER header; + STM_RSC_END end; + STM_RSC_MEM_DESC mem; + STM_RSC_IO_DESC io; + STM_RSC_MMIO_DESC mmio; + STM_RSC_MSR_DESC msr; + STM_RSC_PCI_CFG_DESC pci_cfg; + STM_RSC_TRAPPED_IO_DESC trapped_io; + STM_RSC_ALL_RESOURCES_DESC all; + STM_REGISTER_VIOLATION_DESC register_violation; +} STM_RSC; + +// VMCS database +#define STM_VMCS_DATABASE_REQUEST_ADD 1 +#define STM_VMCS_DATABASE_REQUEST_REMOVE 0 + +// Values for DomainType +// Interpreter of DomainType +#define DOMAIN_DISALLOWED_IO_OUT (1u << 0) +#define DOMAIN_DISALLOWED_IO_IN (1u << 1) +#define DOMAIN_INTEGRITY (1u << 2) +#define DOMAIN_CONFIDENTIALITY (1u << 3) + +#define DOMAIN_UNPROTECTED 0x00 +#define DOMAIN_INTEGRITY_PROT_OUT_IN (DOMAIN_INTEGRITY) +#define DOMAIN_FULLY_PROT_OUT_IN (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY) +#define DOMAIN_FULLY_PROT \ + (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN \ + | DOMAIN_DISALLOWED_IO_OUT) + +// Values for XStatePolicy +#define XSTATE_READWRITE 0x00 +#define XSTATE_READONLY 0x01 +#define XSTATE_SCRUB 0x03 + +typedef struct { + uint64_t vmcs_phys_pointer; // bits 11:0 are reserved and must be 0 + uint32_t domain_type : 4; + uint32_t x_state_policy : 2; + uint32_t degradation_policy : 4; + uint32_t reserved1 : 22; // Must be 0 + uint32_t add_or_remove; +} STM_VMCS_DATABASE_REQUEST; + +// Event log +#define NEW_LOG 1 +#define CONFIGURE_LOG 2 +#define START_LOG 3 +#define STOP_LOG 4 +#define CLEAR_LOG 5 +#define DELETE_LOG 6 +typedef enum { + evt_log_started, + evt_log_stopped, + evt_log_invalid_parameter_detected, + evt_handled_protection_exception, + // unhandled protection exceptions result in reset & cannot be logged + evt_bios_access_to_unclaimed_resource, + evt_mle_resource_protection_granted, + evt_mle_resource_protection_denied, + evt_mle_resource_unprotect, + evt_mle_resource_unprotect_error, + evt_mle_domain_type_degraded, + // add more here + evt_mle_max, + // Not used + evt_invalid = 0xFFFFFFFF, +} EVENT_TYPE; + +typedef struct { + uint32_t page_count; + uint64_t pages[1]; // number of elements is PageCount +} STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA_LOG_BUFFER; + +typedef union { + STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA_LOG_BUFFER log_buffer; + uint32_t event_enable_bitmap; // bitmap of EVENT_TYPE +} STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA; + +typedef struct { + uint32_t sub_functionindex; + STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA data; +} STM_EVENT_LOG_MANAGEMENT_REQUEST; + +// VMCALL API Numbers +// +// API number convention: BIOS facing VMCALL interfaces have bit 16 clear +#define STM_API_MAP_ADDRESS_RANGE 0x00000001 +#define STM_API_UNMAP_ADDRESS_RANGE 0x00000002 +#define STM_API_ADDRESS_LOOKUP 0x00000003 +#define STM_API_RETURN_FROM_PROTECTION_EXCEPTION 0x00000004 + +// API number convention: MLE facing VMCALL interfaces have bit 16 set +// +// The STM configuration lifecycle is as follows: +// 1. SENTER->SINIT->MLE: MLE begins execution with SMI disabled (masked). +// 2. MLE invokes InitializeProtectionVMCALL() to prepare STM for setup of +// initial protection profile. This is done on a single CPU and has global +// effect. +// 3. MLE invokes ProtectResourceVMCALL() to define the initial protection +// profile. The protection profile is global across all CPUs. +// 4. MLE invokes StartStmVMCALL() to enable the STM to begin receiving SMI +// events. This must be done on every logical CPU. +// 5. MLE may invoke ProtectResourceVMCALL() or UnProtectResourceVMCALL() +// during runtime as many times as necessary. +// 6. MLE invokes StopStmVMCALL() to disable the STM. SMI is again masked +// following StopStmVMCALL(). +// +#define STM_API_START 0x00010001 +#define STM_API_STOP 0x00010002 +#define STM_API_PROTECT_RESOURCE 0x00010003 +#define STM_API_UNPROTECT_RESOURCE 0x00010004 +#define STM_API_GET_BIOS_RESOURCES 0x00010005 +#define STM_API_MANAGE_VMCS_DATABASE 0x00010006 +#define STM_API_INITIALIZE_PROTECTION 0x00010007 +#define STM_API_MANAGE_EVENT_LOG 0x00010008 + +// Return codes +typedef uint32_t STM_STATUS; + +#define STM_SUCCESS 0x00000000 +#define SMM_SUCCESS 0x00000000 +// all error codes have bit 31 set +// STM errors have bit 16 set +#define ERROR_STM_SECURITY_VIOLATION 0x80010001 +#define ERROR_STM_CACHE_TYPE_NOT_SUPPORTED 0x80010002 +#define ERROR_STM_PAGE_NOT_FOUND 0x80010003 +#define ERROR_STM_BAD_CR3 0x80010004 +#define ERROR_STM_PHYSICAL_OVER_4G 0x80010005 +#define ERROR_STM_VIRTUAL_SPACE_TOO_SMALL 0x80010006 +#define ERROR_STM_UNPROTECTABLE_RESOURCE 0x80010007 +#define ERROR_STM_ALREADY_STARTED 0x80010008 +#define ERROR_STM_WITHOUT_SMX_UNSUPPORTED 0x80010009 +#define ERROR_STM_STOPPED 0x8001000A +#define ERROR_STM_BUFFER_TOO_SMALL 0x8001000B +#define ERROR_STM_INVALID_VMCS_DATABASE 0x8001000C +#define ERROR_STM_MALFORMED_RESOURCE_LIST 0x8001000D +#define ERROR_STM_INVALID_PAGECOUNT 0x8001000E +#define ERROR_STM_LOG_ALLOCATED 0x8001000F +#define ERROR_STM_LOG_NOT_ALLOCATED 0x80010010 +#define ERROR_STM_LOG_NOT_STOPPED 0x80010011 +#define ERROR_STM_LOG_NOT_STARTED 0x80010012 +#define ERROR_STM_RESERVED_BIT_SET 0x80010013 +#define ERROR_STM_NO_EVENTS_ENABLED 0x80010014 +#define ERROR_STM_OUT_OF_RESOURCES 0x80010015 +#define ERROR_STM_FUNCTION_NOT_SUPPORTED 0x80010016 +#define ERROR_STM_UNPROTECTABLE 0x80010017 +#define ERROR_STM_UNSUPPORTED_MSR_BIT 0x80010018 +#define ERROR_STM_UNSPECIFIED 0x8001FFFF + +// SMM errors have bit 17 set +#define ERROR_SMM_BAD_BUFFER 0x80020001 +#define ERROR_SMM_INVALID_RSC 0x80020004 +#define ERROR_SMM_INVALID_BUFFER_SIZE 0x80020005 +#define ERROR_SMM_BUFFER_TOO_SHORT 0x80020006 +#define ERROR_SMM_INVALID_LIST 0x80020007 +#define ERROR_SMM_OUT_OF_MEMORY 0x80020008 +#define ERROR_SMM_AFTER_INIT 0x80020009 +#define ERROR_SMM_UNSPECIFIED 0x8002FFFF + +// Errors that apply to both have bits 15, 16, and 17 set +#define ERROR_INVALID_API 0x80038001 +#define ERROR_INVALID_PARAMETER 0x80038002 + +// STM TXT.ERRORCODE codes +#define STM_CRASH_PROTECTION_EXCEPTION 0xC000F001 +#define STM_CRASH_PROTECTION_EXCEPTION_FAILURE 0xC000F002 +#define STM_CRASH_DOMAIN_DEGRADATION_FAILURE 0xC000F003 +#define STM_CRASH_BIOS_PANIC 0xC000E000 + +typedef struct { + uint32_t event_serial_number; + uint16_t type; + uint16_t lock : 1; + uint16_t valid : 1; + uint16_t read_by_mle : 1; + uint16_t wrapped : 1; + uint16_t reserved : 12; +} LOG_ENTRY_HEADER; + +typedef struct { + uint32_t reserved; +} ENTRY_EVT_LOG_STARTED; + +typedef struct { + uint32_t reserved; +} ENTRY_EVT_LOG_STOPPED; + +typedef struct { + uint32_t vmcall_api_number; +} ENTRY_EVT_LOG_INVALID_PARAM; + +typedef struct { + STM_RSC resource; +} ENTRY_EVT_LOG_HANDLED_PROTECTION_EXCEPTION; + +typedef struct { + STM_RSC resource; +} ENTRY_EVT_BIOS_ACCESS_UNCLAIMED_RSC; + +typedef struct { + STM_RSC resource; +} ENTRY_EVT_MLE_RSC_PROT_GRANTED; + +typedef struct { + STM_RSC resource; +} ENTRY_EVT_MLE_RSC_PROT_DENIED; + +typedef struct { + STM_RSC resource; +} ENTRY_EVT_MLE_RSC_UNPROT; + +typedef struct { + STM_RSC resource; +} ENTRY_EVT_MLE_RSC_UNPROT_ERROR; + +typedef struct { + uint64_t vmcs_phys_pointer; + uint8_t expected_domain_type; + uint8_t degraded_domain_type; +} ENTRY_EVT_MLE_DOMAIN_TYPE_DEGRADED; + +typedef union { + ENTRY_EVT_LOG_STARTED started; + ENTRY_EVT_LOG_STOPPED stopped; + ENTRY_EVT_LOG_INVALID_PARAM invalid_param; + ENTRY_EVT_LOG_HANDLED_PROTECTION_EXCEPTION + handled_protection_exception; + ENTRY_EVT_BIOS_ACCESS_UNCLAIMED_RSC bios_unclaimed_rsc; + ENTRY_EVT_MLE_RSC_PROT_GRANTED mle_rsc_prot_granted; + ENTRY_EVT_MLE_RSC_PROT_DENIED mle_rsc_prot_denied; + ENTRY_EVT_MLE_RSC_UNPROT mle_rsc_unprot; + ENTRY_EVT_MLE_RSC_UNPROT_ERROR mle_rsc_unprot_error; + ENTRY_EVT_MLE_DOMAIN_TYPE_DEGRADED mle_domain_type_degraded; +} LOG_ENTRY_DATA; + +typedef struct { + LOG_ENTRY_HEADER hdr; + LOG_ENTRY_DATA data; +} STM_LOG_ENTRY; + +#define STM_LOG_ENTRY_SIZE 256 +#define STM_CONFIG_SMI_UNBLOCKING_BY_VMX_OFF 0x1 + +// TXT debug +#define SW_SMI_STM_ADD_RUNTIME_RESOURCES_SUB_FUNC 0 +#define SW_SMI_STM_READ_BIOS_RESOURCES_SUB_FUNC 1 +#define SW_SMI_STM_REPLACE_BIOS_RESOURCES_SUB_FUNC 2 + +typedef struct { + uint32_t buffer_size; + uint32_t reserved; + // uint8_t Data[]; +} TXT_BIOS_DEBUG; + +#pragma pack(pop) + +#endif diff --git a/src/security/intel/stm/StmPlatformResource.c b/src/security/intel/stm/StmPlatformResource.c new file mode 100644 index 0000000..6fef515 --- /dev/null +++ b/src/security/intel/stm/StmPlatformResource.c @@ -0,0 +1,188 @@ +/* @file + * STM platform SMM resource + * + * Copyright (c) 2015, Intel Corporation. All rights reserved. + * This program and the accompanying materials are licensed and made + * available under the terms and conditions of the BSD License which + * accompanies this distribution. The full text of the license may be found + * at http://opensource.org/licenses/bsd-license.php. + * + * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR + * IMPLIED. + */ + +#include <stdint.h> +#include <security/intel/stm/StmApi.h> +#include <security/intel/stm/SmmStm.h> +#include <security/intel/stm/StmPlatformResource.h> + +#if CONFIG(SOUTHBRIDGE_INTEL_COMMON_PMCLIB) +#include <southbridge/intel/common/pmutil.h> +#else +#include <soc/pm.h> +#endif +#include <cpu/x86/msr.h> +#include <console/console.h> + +#define RDWR_ACCS 3 +#define FULL_ACCS 7 + +// Fixed memory ranges +// +// TSEG memory! +static STM_RSC_MEM_DESC rsc_tseg_memory = {{MEM_RANGE, sizeof(STM_RSC_MEM_DESC)}, + 0, + 0, + FULL_ACCS}; + +// Flash part +static STM_RSC_MEM_DESC rsc_spi_memory = { + {MEM_RANGE, sizeof(STM_RSC_MEM_DESC)}, + 0xFE000000, + 0x01000000, + FULL_ACCS}; + +// ACPI +static STM_RSC_IO_DESC rsc_pm_io = {{IO_RANGE, sizeof(STM_RSC_IO_DESC)}, 0, 128}; + +// PCIE MMIO +static STM_RSC_MMIO_DESC rsc_pcie_mmio = {{MMIO_RANGE, sizeof(STM_RSC_MMIO_DESC)}, + 0, + 0, // Length + RDWR_ACCS}; + +// Local APIC +static STM_RSC_MMIO_DESC rsc_apic_mmio = {{MMIO_RANGE, sizeof(STM_RSC_MMIO_DESC)}, + 0, + 0x400, + RDWR_ACCS}; + +// Software SMI +static STM_RSC_TRAPPED_IO_DESC rsc_sw_smi_trap_io = { + {TRAPPED_IO_RANGE, sizeof(STM_RSC_TRAPPED_IO_DESC)}, + 0xB2, + 2}; + +// End of list +static STM_RSC_END rsc_list_end __attribute__((used)) = { + {END_OF_RESOURCES, sizeof(STM_RSC_END)}, 0}; + +// Common PCI devices +// +// LPC bridge +STM_RSC_PCI_CFG_DESC rsc_lpc_bridge_pci = { + {PCI_CFG_RANGE, sizeof(STM_RSC_PCI_CFG_DESC)}, + RDWR_ACCS, + 0, + 0, + 0x1000, + 0, + 0, + { + {1, 1, sizeof(STM_PCI_DEVICE_PATH_NODE), LPC_FUNCTION, + LPC_DEVICE}, + }, +}; + +// Template for MSR resources. +STM_RSC_MSR_DESC rsc_msr_tpl = { + {MACHINE_SPECIFIC_REG, sizeof(STM_RSC_MSR_DESC)}, +}; + +// MSR indices to register +typedef struct { + uint32_t msr_index; + uint64_t read_mask; + uint64_t write_mask; +} MSR_TABLE_ENTRY; + +MSR_TABLE_ENTRY msr_table[] = { + // Index Read Write + // MASK64 means need access, MASK0 means no need access. + {SMRR_PHYSBASE_MSR, MASK64, MASK0}, + {SMRR_PHYSMASK_MSR, MASK64, MASK0}, +}; + +/* + * Fix up PCIE resource. + */ +static void fixup_pciex_resource(void) +{ + // Find max bus number and PCIEX length + rsc_pcie_mmio.length = CONFIG_SA_PCIEX_LENGTH; // 0x10000000;// 256 MB + rsc_pcie_mmio.base = CONFIG_MMCONF_BASE_ADDRESS; +} + +/* + * Add basic resources to BIOS resource database. + */ +static void add_simple_resources(void) +{ + int Status = 0; + msr_t ReadMsr; + + ReadMsr = rdmsr(SMRR_PHYSBASE_MSR); + rsc_tseg_memory.base = ReadMsr.lo & 0xFFFFF000; + + ReadMsr = rdmsr(SMRR_PHYSMASK_MSR); + rsc_tseg_memory.length = (~(ReadMsr.lo & 0xFFFFF000) + 1); + + rsc_pm_io.base = (uint16_t)get_pmbase(); + + // Local APIC. We assume that all thteads are programmed identically + // despite that it is possible to have individual APIC address for + // each of the threads. If this is the case this programming should + // be corrected. + ReadMsr = rdmsr(IA32_APIC_BASE_MSR_INDEX); + rsc_apic_mmio.base = ((uint64_t)ReadMsr.lo & 0xFFFFF000) | + ((uint64_t)(ReadMsr.hi & 0x0000000F) << 32); + + // PCIEX BAR + fixup_pciex_resource(); + + Status |= add_pi_resource((void *)&rsc_tseg_memory, 1); + Status |= add_pi_resource((void *)&rsc_spi_memory, 1); + + Status |= add_pi_resource((void *)&rsc_pm_io, 1); + Status |= add_pi_resource((void *)&rsc_pcie_mmio, 1); + Status |= add_pi_resource((void *)&rsc_apic_mmio, 1); + Status |= add_pi_resource((void *)&rsc_sw_smi_trap_io, 1); + + Status |= add_pi_resource((void *)&rsc_lpc_bridge_pci, 1); + + if (Status != 0) + printk(BIOS_DEBUG, "STM - Error in adding simple resources\n"); +} + +/* + * Add MSR resources to BIOS resource database. + */ +static void add_msr_resources(void) +{ + uint32_t Status = 0; + uint32_t Index; + + for (Index = 0; Index < ARRAY_SIZE(msr_table); Index++) { + + rsc_msr_tpl.msr_index = (uint32_t)msr_table[Index].msr_index; + rsc_msr_tpl.read_mask = (uint64_t)msr_table[Index].read_mask; + rsc_msr_tpl.write_mask = (uint64_t)msr_table[Index].write_mask; + + Status |= add_pi_resource((void *)&rsc_msr_tpl, 1); + } + + if (Status != 0) + printk(BIOS_DEBUG, "STM - Error in adding MSR resources\n"); +} + +/* + * Add resources to BIOS resource database. + */ +void add_resources_cmd(void) +{ + + add_simple_resources(); + + add_msr_resources(); +} diff --git a/src/security/intel/stm/StmPlatformResource.h b/src/security/intel/stm/StmPlatformResource.h new file mode 100644 index 0000000..7db2fc0 --- /dev/null +++ b/src/security/intel/stm/StmPlatformResource.h @@ -0,0 +1,32 @@ +/* @file + * STM platform SMM resource + * + * Copyright (c) 2015, Intel Corporation. All rights reserved. + * This program and the accompanying materials are licensed and made available + * under the terms and conditions of the BSD License which accompanies this + * distribution. The full text of the license may be found at + * http://opensource.org/licenses/bsd-license.php. + * + * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR + * IMPLIED. + */ + +#ifndef _STM_PLATFORM_RESOURCE_H_ +#define _STM_PLATFORM_RESOURCE_H_ + +#define MASK0 0 +#define MASK64 0xFFFFFFFFFFFFFFFFull + +// LPC + +#define LPC_DEVICE 31 +#define LPC_FUNCTION 0 +#define R_ACPI_PM_BASE 0x40 +#define ACPI_PM_BASE_MASK 0xFFF8 + +/* + * Add resources to BIOS resource database. + */ +void add_resources_cmd(void); +#endif diff --git a/src/security/intel/stm/StmPlatformSmm.c b/src/security/intel/stm/StmPlatformSmm.c new file mode 100644 index 0000000..d7064b0 --- /dev/null +++ b/src/security/intel/stm/StmPlatformSmm.c @@ -0,0 +1,204 @@ +/* @file + * STM platform SMM API + * + * Copyright (c) 2015, Intel Corporation. All rights reserved. + * This program and the accompanying materials are licensed and made + * available under the terms and conditions of the BSD License which + * accompanies this distribution. The full text of the license may be found + * at http://opensource.org/licenses/bsd-license.php. + * + * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR + * IMPLIED. + * + */ + +#include <security/intel/stm/StmApi.h> +#include <security/intel/stm/SmmStm.h> +#include <security/intel/stm/StmPlatformResource.h> +#include <security/tpm/tspi.h> +#include <cpu/x86/smm.h> +#include <cpu/x86/msr.h> + +#include <stddef.h> +#include <cbfs.h> +#include <console/console.h> +#include <lib.h> +#include <stdint.h> +#include <arch/rom_segs.h> + +/* + * Load STM image to MSEG + * + * @retval SUCCESS STM is loaded to MSEG + */ +int load_stm_image(uintptr_t mseg) +{ + int status; + void *mseg_base; + uint32_t stm_buffer_size; + uint32_t stm_image_size; + bool stm_status; + + STM_HEADER *stm_header; + + // Extract STM image from FV + mseg_base = (void *)mseg; + stm_buffer_size = CONFIG_MSEG_SIZE; + stm_image_size = 0; + + memset((void *)mseg_base, 0, CONFIG_MSEG_SIZE); // clear the mseg + + stm_image_size = cbfs_boot_load_file("stm.bin", mseg_base, + stm_buffer_size, CBFS_TYPE_RAW); + printk(BIOS_DEBUG, "STM:loaded into mseg: 0x%p size: %u\n", mseg_base, + stm_image_size); + /* status is number of bytes loaded */ + stm_status = stm_check_stm_image(mseg_base, stm_image_size); + + if (!stm_status) { + printk(BIOS_DEBUG, "STM: Error in STM image\n"); + return -1; + } + + stm_header = mseg_base; + + stm_gen_4g_pagetable_x64((uint32_t)mseg_base + + stm_header->hw_stm_hdr.cr3_offset); + + // Debug stuff + printk(BIOS_DEBUG, + "STM: Header-Revision %d Features 0x%08x Cr3Offset 0x%08x\n", + stm_header->hw_stm_hdr.stm_header_revision, + stm_header->hw_stm_hdr.monitor_features, + stm_header->hw_stm_hdr.cr3_offset); + printk(BIOS_DEBUG, + "STM: Header-StaticImageSize: %d Cr3Location: 0x%08x\n", + stm_header->sw_stm_hdr.static_image_size, + ((uint32_t)mseg_base + stm_header->hw_stm_hdr.cr3_offset)); + + status = 0; // always return good for now + + return status; +} + +struct descriptor { + uint16_t limit; + uintptr_t base; +} __attribute__((packed)); + + +static void read_gdtr(struct descriptor *gdtr) +{ + __asm__ __volatile__("sgdt %0" : "=m"(*gdtr)); +} + +void setup_smm_descriptor(void *smbase, void *base_smbase, int32_t apic_id, + int32_t entry32_off) +{ + struct descriptor gdtr; + void *smbase_processor; + //msr_t smbase_msr; + + TXT_PROCESSOR_SMM_DESCRIPTOR *psd; + + smbase_processor = (void *) SMM_DEFAULT_BASE;//we are here + psd = smbase + SMM_PSD_OFFSET; + + printk(BIOS_DEBUG, + "STM: Smm Descriptor setup: Smbase: %p Smbase_processor: %p Psd: %p\n", + smbase, + smbase_processor, + psd); + + memset(psd, 0, sizeof(TXT_PROCESSOR_SMM_DESCRIPTOR)); + + memcpy(&psd->signature, TXT_PROCESSOR_SMM_DESCRIPTOR_SIGNATURE, 8); + psd->smm_descriptor_ver_major = + TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MAJOR; + psd->smm_descriptor_ver_minor = + TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MINOR; + psd->smm_smi_handler_rip = + (uint64_t)((uintptr_t)base_smbase + SMM_ENTRY_OFFSET + + entry32_off); + psd->local_apic_id = apic_id; + psd->size = sizeof(TXT_PROCESSOR_SMM_DESCRIPTOR); + psd->acpi_rsdp = 0; + psd->bios_hw_resource_requirements_ptr = + (uint64_t)((uintptr_t)get_stm_resource()); + psd->smm_cs = ROM_CODE_SEG; + psd->smm_ds = ROM_DATA_SEG; + psd->smm_ss = ROM_DATA_SEG; + psd->smm_other_segment = ROM_DATA_SEG; + psd->smm_tr = SMM_TASK_STATE_SEG; + + + // At this point the coreboot smm_stub is relative to the default + // smbase and not the one for the smi handler in tseg. So we have + // to adjust the gdtr.base + + read_gdtr(&gdtr); + + gdtr.base -= (uintptr_t) smbase_processor; + gdtr.base += (uintptr_t) base_smbase; + + psd->smm_gdt_ptr = gdtr.base; + psd->smm_gdt_size = gdtr.limit + 1; // the stm will subtract, so add + printk(BIOS_DEBUG, "STM: Smm Descriptor setup complete - Smbase: %p Psd: %p\n", + smbase, psd); +} + +extern uint8_t *stm_resource_heap; + +#define FXSAVE_SIZE 512 + +static int stm_load_status = 0; + +void stm_setup(uintptr_t mseg, int cpu, int num_cpus, uintptr_t smbase, + uintptr_t base_smbase, uint32_t offset32) +{ + msr_t InitMseg; + msr_t MsegChk; + uintptr_t addr_calc; // used to calculate the stm resource heap area + + printk(BIOS_DEBUG, "STM: set up for cpu %d/%d\n", cpu, num_cpus); + if (cpu == 0) { + + // need to create the BIOS resource list once + // first calculate the location in SMRAM + addr_calc = (mseg - (CONFIG_SMM_MODULE_STACK_SIZE * num_cpus)); + + if (CONFIG(SSE)) + addr_calc -= FXSAVE_SIZE * num_cpus; + + addr_calc -= CONFIG_BIOS_RESOURCE_LIST_SIZE; + stm_resource_heap = (uint8_t *) addr_calc; + printk(BIOS_DEBUG, "STM: stm_resource_heap located at %p\n", + stm_resource_heap); + //setup the the list + add_resources_cmd(); + + stm_load_status = load_stm_image(mseg); + } + + if (stm_load_status == 0) { + // enable STM for this cpu + InitMseg.lo = mseg | IA32_SMM_MONITOR_VALID; + InitMseg.hi = 0; + + wrmsr(IA32_SMM_MONITOR_CTL_MSR, InitMseg); + + MsegChk = rdmsr(IA32_SMM_MONITOR_CTL_MSR); + + printk(BIOS_DEBUG, "STM: MSEG Initialized (%d) 0x%08x 0x%08x\n", + cpu, MsegChk.hi, MsegChk.lo); + + // setup the descriptor for this cpu + setup_smm_descriptor((void *)smbase, (void *) base_smbase, + cpu, offset32); + } else { + printk(BIOS_DEBUG, + "STM: Error in STM load, STM not enabled: %d\n", + cpu); + } +}
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 57:
Automatic boot test returned (PASS/FAIL/TOTAL): 3/0/3 Emulation targets: EMULATION_QEMU_X86_Q35 using payload TianoCore : SUCCESS : https://lava.9esec.io/r/446 EMULATION_QEMU_X86_Q35 using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/445 EMULATION_QEMU_X86_I440FX using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/444
Please note: This test is under development and might not be accurate at all!
Patrick Rudolph has created a revert of this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 57:
(3 comments)
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/mp_init.c File src/cpu/x86/mp_init.c:
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/mp_init.c@750 PS57, Line 750: if (is_smm_enabled()) { What's this about? AFAICS, we are in SMM.
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/smm/smm_module... File src/cpu/x86/smm/smm_module_loader.c:
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/smm/smm_module... PS57, Line 365: base += size - CONFIG_MSEG_SIZE; // take out the mseg What is MSEG, why is it not in the picture above?
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/smm/smm_module... PS57, Line 398: // account for the bios resource list This comment and the empty lines kind of break the relation of the comment in line 394 and line 402.
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 57:
(3 comments)
Responded to Nico Huber's comments
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/mp_init.c File src/cpu/x86/mp_init.c:
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/mp_init.c@750 PS57, Line 750: if (is_smm_enabled()) {
What's this about? AFAICS, we are in SMM.
You're correct. I didn't catch that trigger_smm_relocation prevented this code path. I will issue a correction.
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/smm/smm_module... File src/cpu/x86/smm/smm_module_loader.c:
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/smm/smm_module... PS57, Line 365: base += size - CONFIG_MSEG_SIZE; // take out the mseg
What is MSEG, why is it not in the picture above?
MSEG, aka monitor segment, is where the STM is loaded. It is normally at the top of the TSEG, and in coreboot the MSEG is located in the region above where the SMI handler is located. It was not added in this diagram because the function is focused on the SMI handler (aka SMM module)
If you think that it will add clarity, I can add the MSEG to the diagram.
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/smm/smm_module... PS57, Line 398: // account for the bios resource list
This comment and the empty lines kind of break the relation of the comment […]
I will take out the blank line
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 57:
(1 comment)
Sorry for bugging you after merge btw. I do understand that you wanted to avoid breakage by squashing commits, however I guess that you didn't get the usual heads up because of the big commit with `security/intel/` prefix.
If you have even trouble splitting commits again, feel free to ask on the mailing list or IRC.
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/smm/smm_module... File src/cpu/x86/smm/smm_module_loader.c:
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/smm/smm_module... PS57, Line 365: base += size - CONFIG_MSEG_SIZE; // take out the mseg
MSEG, aka monitor segment, is where the STM is loaded. It is normally at the top of the TSEG, and in coreboot the MSEG is located in the region above where the SMI handler is located. It was not added in this diagram because the function is focused on the SMI handler (aka SMM module)
If that is the case, shouldn't the caller take care of subtracting MSEG?
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 57:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/smm/smm_module... File src/cpu/x86/smm/smm_module_loader.c:
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/smm/smm_module... PS57, Line 365: base += size - CONFIG_MSEG_SIZE; // take out the mseg
MSEG, aka monitor segment, is where the STM is loaded. […]
Same for the BIOS resource list. Is there any reason not to put it above the stacks? If we could place everything STM specific on top, all we'd have to do is to report a lower `perm_smsize` in `.get_smm_info` and the cpu/x86/ code wouldn't have to know anything about STM.
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 57:
Patch Set 57:
(1 comment)
Sorry for bugging you after merge btw. I do understand that you wanted to avoid breakage by squashing commits, however I guess that you didn't get the usual heads up because of the big commit with `security/intel/` prefix.
If you have even trouble splitting commits again, feel free to ask on the mailing list or IRC.
Actually, when I started this process I naively submitted everything as one patch and was kindly told to split it up. So, I did. That created some issues there were some circular dependencies. So, it mostly (like 95%) came back together.
Thanks for the offer of help.
cedarhouse1@comcast.net has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33234 )
Change subject: security/intel/stm: Add STM support ......................................................................
Patch Set 57:
(1 comment)
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/smm/smm_module... File src/cpu/x86/smm/smm_module_loader.c:
https://review.coreboot.org/c/coreboot/+/33234/57/src/cpu/x86/smm/smm_module... PS57, Line 365: base += size - CONFIG_MSEG_SIZE; // take out the mseg
Same for the BIOS resource list. Is there any reason not to put it above […]
Yes, and the test patches you submitted work.