2605 comments:
Patch Set #1, Line 44: extern int LoadStmImage(uint32_t);
function definition argument 'uint32_t' should also have an identifier name
Patch Set #1, Line 856: LoadStmImage(mseg);
code indent should use tabs where possible
Patch Set #1, Line 856: LoadStmImage(mseg);
please, no spaces at the start of a line
Patch Set #1, Line 1044: /* Currently, the CPU SMM save state size is based on a simplistic algorithm.
line over 80 characters
Patch Set #1, Line 1046: * note: In the future, this will need to handle newer x86 that require 32k boundries.*/
line over 80 characters
Patch Set #1, Line 1047: state->smm_save_state_size += (sizeof(TXT_PROCESSOR_SMM_DESCRIPTOR) + 0x1000) & 0xfffff000;
line over 80 characters
File src/cpu/x86/smm/smm_module_handler.c:
Patch Set #1, Line 31: #define IA32_SMM_MONITOR_VALID 1<<0
Macros with complex values should be enclosed in parentheses
Patch Set #1, Line 145: /* this initialzation strategy works on the assumption that all processors will
line over 80 characters
Patch Set #1, Line 146: * enter SMM at generally the same time. If a single processor lags then a
line over 80 characters
Patch Set #1, Line 148: if(MsegInit == 0)
space required before the open parenthesis '('
trailing whitespace
Patch Set #1, Line 169: if(MsegInit == 0)
that open brace { should be on the previous line
Patch Set #1, Line 169: if(MsegInit == 0)
space required before the open parenthesis '('
Patch Set #1, Line 182: console_init();
code indent should use tabs where possible
Patch Set #1, Line 182: console_init();
please, no spaces at the start of a line
Patch Set #1, Line 184: printk(BIOS_DEBUG, "MSEG Initialized (%d) 0x%08x 0x%08x\n", cpu, MsegChk.hi, MsegChk.lo );
line over 80 characters
Patch Set #1, Line 184: printk(BIOS_DEBUG, "MSEG Initialized (%d) 0x%08x 0x%08x\n", cpu, MsegChk.hi, MsegChk.lo );
space prohibited before that close parenthesis ')'
trailing whitespace
Patch Set #1, Line 193: void * smbase = (void *) smm_runtime->smbase;
code indent should use tabs where possible
Patch Set #1, Line 193: void * smbase = (void *) smm_runtime->smbase;
please, no spaces at the start of a line
Patch Set #1, Line 193: void * smbase = (void *) smm_runtime->smbase;
"foo * bar" should be "foo *bar"
Patch Set #1, Line 203: if(MsegInit2 == 0)
that open brace { should be on the previous line
Patch Set #1, Line 203: if(MsegInit2 == 0)
space required before the open parenthesis '('
trailing whitespace
Patch Set #1, Line 206: SetupSmmDescriptor(smbase, smm_runtime->save_state_size, cpu, smm_runtime->start32_offset);
line over 80 characters
Patch Set #1, Line 206: SetupSmmDescriptor(smbase, smm_runtime->save_state_size, cpu, smm_runtime->start32_offset);
code indent should use tabs where possible
Patch Set #1, Line 206: SetupSmmDescriptor(smbase, smm_runtime->save_state_size, cpu, smm_runtime->start32_offset);
please, no space before tabs
Patch Set #1, Line 206: SetupSmmDescriptor(smbase, smm_runtime->save_state_size, cpu, smm_runtime->start32_offset);
please, no spaces at the start of a line
Patch Set #1, Line 217: if(MsegInit == 0){
space required before the open brace '{'
Patch Set #1, Line 217: if(MsegInit == 0){
space required before the open parenthesis '('
Patch Set #1, Line 218: void * smbase = (void *) smm_runtime->smbase;
"foo * bar" should be "foo *bar"
Patch Set #1, Line 224: SetupSmmDescriptor(smbase, smm_runtime->save_state_size, cpu, smm_runtime->start32_offset);
line over 80 characters
File src/cpu/x86/smm/smm_module_loader.c:
Patch Set #1, Line 275: stub_params->runtime.mseg = (uint32_t) params->stack_top; // mseg is after the smi handler
line over 80 characters
Patch Set #1, Line 285: smm_stub_loc, params->handler, params->handler_arg, (void *) stub_params->runtime.mseg);
line over 80 characters
Patch Set #1, Line 365: #else
trailing whitespace
Patch Set #1, Line 369: params->stack_top = base;
code indent should use tabs where possible
Patch Set #1, Line 369: params->stack_top = base;
please, no spaces at the start of a line
File src/cpu/x86/smm/smm_stub.S:
Patch Set #1, Line 53: .long smm_trampoline32 - _start
trailing whitespace
File src/include/cpu/x86/SmmStm.h:
Patch Set #1, Line 1: /** @file
trailing whitespace
Patch Set #1, Line 2: SMM STM support
trailing whitespace
trailing whitespace
Patch Set #1, Line 4: Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
trailing whitespace
Patch Set #1, Line 5: This program and the accompanying materials
trailing whitespace
Patch Set #1, Line 6: are licensed and made available under the terms and conditions of the BSD License
trailing whitespace
Patch Set #1, Line 6: are licensed and made available under the terms and conditions of the BSD License
line over 80 characters
Patch Set #1, Line 7: which accompanies this distribution. The full text of the license may be found at
trailing whitespace
Patch Set #1, Line 7: which accompanies this distribution. The full text of the license may be found at
line over 80 characters
Patch Set #1, Line 8: http://opensource.org/licenses/bsd-license.php.
trailing whitespace
trailing whitespace
Patch Set #1, Line 10: THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
trailing whitespace
Patch Set #1, Line 11: WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
trailing whitespace
trailing whitespace
DOS line endings
DOS line endings
Patch Set #1, Line 15: #ifndef _SMM_STM_H_
DOS line endings
Patch Set #1, Line 16: #define _SMM_STM_H_
DOS line endings
DOS line endings
Patch Set #1, Line 18: #include "StmApi.h"
DOS line endings
DOS line endings
Patch Set #1, Line 20: #define IA32_VMX_BASIC_MSR_INDEX 0x480
DOS line endings
Patch Set #1, Line 21: #define IA32_VMX_MISC_MSR_INDEX 0x485
DOS line endings
Patch Set #1, Line 22: #define IA32_SMM_MONITOR_CTL_MSR_INDEX 0x9B
DOS line endings
Patch Set #1, Line 23: #define IA32_SMM_MONITOR_VALID 1<<0
DOS line endings
Patch Set #1, Line 23: #define IA32_SMM_MONITOR_VALID 1<<0
Macros with complex values should be enclosed in parentheses
DOS line endings
trailing whitespace
trailing whitespace
Patch Set #1, Line 27: Load STM image to MSEG.
trailing whitespace
trailing whitespace
Patch Set #1, Line 29: @param StmImage STM image
trailing whitespace
Patch Set #1, Line 30: @param StmImageSize STM image size
trailing whitespace
trailing whitespace
Patch Set #1, Line 32: @retval EFI_SUCCESS Load STM to MSEG successfully
trailing whitespace
Patch Set #1, Line 33: @retval EFI_BUFFER_TOO_SMALL MSEG is smaller than minimal requirement of STM image
trailing whitespace
Patch Set #1, Line 33: @retval EFI_BUFFER_TOO_SMALL MSEG is smaller than minimal requirement of STM image
line over 80 characters
trailing whitespace
DOS line endings
Patch Set #1, Line 36: int LoadMonitor (
DOS line endings
Patch Set #1, Line 36: int LoadMonitor (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 37: void * StmImage,
DOS line endings
Patch Set #1, Line 37: void * StmImage,
please, no spaces at the start of a line
Patch Set #1, Line 37: void * StmImage,
"foo * bar" should be "foo *bar"
Patch Set #1, Line 38: uint32_t StmImageSize
DOS line endings
Patch Set #1, Line 38: uint32_t StmImageSize
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
trailing whitespace
trailing whitespace
Patch Set #1, Line 43: Add resources in list to database. Allocate new memory areas as needed.
trailing whitespace
trailing whitespace
Patch Set #1, Line 45: @param ResourceList A pointer to resource list to be added
trailing whitespace
Patch Set #1, Line 46: @param NumEntries Optional number of entries.
trailing whitespace
Patch Set #1, Line 47: If 0, list must be terminated by END_OF_RESOURCES.
trailing whitespace
Patch Set #1, Line 47: If 0, list must be terminated by END_OF_RESOURCES.
code indent should use tabs where possible
trailing whitespace
Patch Set #1, Line 49: @retval EFI_SUCCESS If resources are added
trailing whitespace
Patch Set #1, Line 50: @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer
trailing whitespace
Patch Set #1, Line 51: @retval EFI_OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas.
trailing whitespace
Patch Set #1, Line 51: @retval EFI_OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas.
line over 80 characters
trailing whitespace
DOS line endings
Patch Set #1, Line 54: int AddPiResource (
DOS line endings
Patch Set #1, Line 54: int AddPiResource (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 55: STM_RSC *ResourceList,
DOS line endings
Patch Set #1, Line 55: STM_RSC *ResourceList,
please, no spaces at the start of a line
Patch Set #1, Line 55: STM_RSC *ResourceList,
need consistent spacing around '*' (ctx:WxV)
Patch Set #1, Line 56: uint32_t NumEntries
DOS line endings
Patch Set #1, Line 56: uint32_t NumEntries
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
trailing whitespace
trailing whitespace
Patch Set #1, Line 61: Delete resources in list to database.
trailing whitespace
trailing whitespace
Patch Set #1, Line 63: @param ResourceList A pointer to resource list to be deleted
trailing whitespace
Patch Set #1, Line 64: NULL means delete all resources.
trailing whitespace
Patch Set #1, Line 64: NULL means delete all resources.
code indent should use tabs where possible
Patch Set #1, Line 65: @param NumEntries Optional number of entries.
trailing whitespace
Patch Set #1, Line 66: If 0, list must be terminated by END_OF_RESOURCES.
trailing whitespace
Patch Set #1, Line 66: If 0, list must be terminated by END_OF_RESOURCES.
code indent should use tabs where possible
trailing whitespace
Patch Set #1, Line 68: @retval EFI_SUCCESS If resources are deleted
trailing whitespace
Patch Set #1, Line 69: @retval EFI_INVALID_PARAMETER If nested procedure detected resource failer
trailing whitespace
trailing whitespace
DOS line endings
Patch Set #1, Line 72: int DeletePiResource (
DOS line endings
Patch Set #1, Line 72: int DeletePiResource (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 73: STM_RSC *ResourceList,
DOS line endings
Patch Set #1, Line 73: STM_RSC *ResourceList,
please, no spaces at the start of a line
Patch Set #1, Line 73: STM_RSC *ResourceList,
need consistent spacing around '*' (ctx:WxV)
Patch Set #1, Line 74: uint32_t NumEntries
DOS line endings
Patch Set #1, Line 74: uint32_t NumEntries
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
trailing whitespace
trailing whitespace
Patch Set #1, Line 79: Get BIOS resources.
trailing whitespace
trailing whitespace
Patch Set #1, Line 81: @param ResourceList A pointer to resource list to be filled
trailing whitespace
Patch Set #1, Line 82: @param ResourceSize On input it means size of resource list input.
trailing whitespace
Patch Set #1, Line 83: On output it means size of resource list filled,
trailing whitespace
Patch Set #1, Line 83: On output it means size of resource list filled,
code indent should use tabs where possible
Patch Set #1, Line 84: or the size of resource list to be filled if size of too small.
trailing whitespace
Patch Set #1, Line 84: or the size of resource list to be filled if size of too small.
line over 80 characters
Patch Set #1, Line 84: or the size of resource list to be filled if size of too small.
code indent should use tabs where possible
trailing whitespace
Patch Set #1, Line 86: @retval EFI_SUCCESS If resources are returned.
trailing whitespace
Patch Set #1, Line 87: @retval EFI_BUFFER_TOO_SMALL If resource list buffer is too small to hold the whole resources.
trailing whitespace
Patch Set #1, Line 87: @retval EFI_BUFFER_TOO_SMALL If resource list buffer is too small to hold the whole resources.
line over 80 characters
trailing whitespace
DOS line endings
Patch Set #1, Line 90: int GetPiResource (
DOS line endings
Patch Set #1, Line 90: int GetPiResource (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 91: STM_RSC *ResourceList,
DOS line endings
Patch Set #1, Line 91: STM_RSC *ResourceList,
please, no spaces at the start of a line
Patch Set #1, Line 91: STM_RSC *ResourceList,
need consistent spacing around '*' (ctx:WxV)
Patch Set #1, Line 92: uint32_t *ResourceSize
DOS line endings
Patch Set #1, Line 92: uint32_t *ResourceSize
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
trailing whitespace
Patch Set #1, Line 96: This function notify STM resource change.
trailing whitespace
trailing whitespace
Patch Set #1, Line 98: @param StmResource BIOS STM resource
trailing whitespace
trailing whitespace
DOS line endings
DOS line endings
Patch Set #1, Line 102: NotifyStmResourceChange (
DOS line endings
Patch Set #1, Line 102: NotifyStmResourceChange (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 103: void *StmResource
DOS line endings
Patch Set #1, Line 103: void *StmResource
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
trailing whitespace
Patch Set #1, Line 107: This function return BIOS STM resource.
trailing whitespace
trailing whitespace
Patch Set #1, Line 109: @return BIOS STM resource
trailing whitespace
trailing whitespace
DOS line endings
Patch Set #1, Line 112: void *
DOS line endings
Patch Set #1, Line 112: void *
function definition argument 'void' should also have an identifier name
Patch Set #1, Line 113: GetStmResource (
DOS line endings
Patch Set #1, Line 113: GetStmResource (
space prohibited between function name and open parenthesis '('
DOS line endings
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 117: void SetupSmmDescriptor(void * smbase, int32_t state_size, int32_t apic_id, int32_t entry32_off);
DOS line endings
Patch Set #1, Line 117: void SetupSmmDescriptor(void * smbase, int32_t state_size, int32_t apic_id, int32_t entry32_off);
line over 80 characters
Patch Set #1, Line 117: void SetupSmmDescriptor(void * smbase, int32_t state_size, int32_t apic_id, int32_t entry32_off);
"foo * bar" should be "foo *bar"
DOS line endings
DOS line endings
Patch Set #1, Line 120: #endif
DOS line endings
File src/include/cpu/x86/StmApi.h:
Patch Set #1, Line 1: /** @file
trailing whitespace
Patch Set #1, Line 2: STM API definition
trailing whitespace
trailing whitespace
Patch Set #1, Line 4: Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
trailing whitespace
Patch Set #1, Line 5: This program and the accompanying materials
trailing whitespace
Patch Set #1, Line 6: are licensed and made available under the terms and conditions of the BSD License
trailing whitespace
Patch Set #1, Line 6: are licensed and made available under the terms and conditions of the BSD License
line over 80 characters
Patch Set #1, Line 7: which accompanies this distribution. The full text of the license may be found at
trailing whitespace
Patch Set #1, Line 7: which accompanies this distribution. The full text of the license may be found at
line over 80 characters
Patch Set #1, Line 8: http://opensource.org/licenses/bsd-license.php.
trailing whitespace
trailing whitespace
Patch Set #1, Line 10: THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
trailing whitespace
Patch Set #1, Line 11: WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
trailing whitespace
trailing whitespace
DOS line endings
DOS line endings
Patch Set #1, Line 15: #ifndef _STM_API_H_
DOS line endings
Patch Set #1, Line 16: #define _STM_API_H_
DOS line endings
DOS line endings
Patch Set #1, Line 18: #include <stdint.h>
DOS line endings
DOS line endings
Patch Set #1, Line 20: // definition in STM spec
trailing whitespace
DOS line endings
Patch Set #1, Line 22: #define STM_SPEC_VERSION_MAJOR 1
DOS line endings
Patch Set #1, Line 23: #define STM_SPEC_VERSION_MINOR 0
DOS line endings
DOS line endings
Patch Set #1, Line 25: typedef uint64_t UINTN;
DOS line endings
DOS line endings
Patch Set #1, Line 27: #pragma pack (push, 1)
DOS line endings
Patch Set #1, Line 27: #pragma pack (push, 1)
space prohibited between function name and open parenthesis '('
DOS line endings
Patch Set #1, Line 29: #define STM_HARDWARE_FIELD_FILL_TO_2K (2048 - sizeof(uint32_t) * 8)
DOS line endings
Patch Set #1, Line 30: typedef struct {
DOS line endings
Patch Set #1, Line 31: uint32_t StmHeaderRevision;
DOS line endings
Patch Set #1, Line 31: uint32_t StmHeaderRevision;
please, no spaces at the start of a line
Patch Set #1, Line 32: uint32_t MonitorFeatures;
DOS line endings
Patch Set #1, Line 32: uint32_t MonitorFeatures;
please, no spaces at the start of a line
Patch Set #1, Line 33: uint32_t GdtrLimit;
DOS line endings
Patch Set #1, Line 33: uint32_t GdtrLimit;
please, no spaces at the start of a line
Patch Set #1, Line 34: uint32_t GdtrBaseOffset;
DOS line endings
Patch Set #1, Line 34: uint32_t GdtrBaseOffset;
please, no spaces at the start of a line
Patch Set #1, Line 35: uint32_t CsSelector;
DOS line endings
Patch Set #1, Line 35: uint32_t CsSelector;
please, no spaces at the start of a line
Patch Set #1, Line 36: uint32_t EipOffset;
DOS line endings
Patch Set #1, Line 36: uint32_t EipOffset;
please, no spaces at the start of a line
Patch Set #1, Line 37: uint32_t EspOffset;
DOS line endings
Patch Set #1, Line 37: uint32_t EspOffset;
please, no spaces at the start of a line
Patch Set #1, Line 38: uint32_t Cr3Offset;
DOS line endings
Patch Set #1, Line 38: uint32_t Cr3Offset;
please, no spaces at the start of a line
Patch Set #1, Line 39: uint8_t Reserved[STM_HARDWARE_FIELD_FILL_TO_2K];
DOS line endings
Patch Set #1, Line 39: uint8_t Reserved[STM_HARDWARE_FIELD_FILL_TO_2K];
please, no spaces at the start of a line
Patch Set #1, Line 40: } HARDWARE_STM_HEADER;
DOS line endings
DOS line endings
Patch Set #1, Line 42: #define STM_FEATURES_IA32E 0x1
DOS line endings
DOS line endings
Patch Set #1, Line 44: typedef struct {
DOS line endings
Patch Set #1, Line 45: uint32_t Intel64ModeSupported :1; // bitfield
trailing whitespace
Patch Set #1, Line 45: uint32_t Intel64ModeSupported :1; // bitfield
please, no spaces at the start of a line
Patch Set #1, Line 46: uint32_t EptSupported :1; // bitfield
trailing whitespace
Patch Set #1, Line 46: uint32_t EptSupported :1; // bitfield
please, no spaces at the start of a line
Patch Set #1, Line 47: uint32_t Reserved :30; // must be 0
trailing whitespace
Patch Set #1, Line 47: uint32_t Reserved :30; // must be 0
please, no spaces at the start of a line
Patch Set #1, Line 48: } STM_FEAT;
DOS line endings
DOS line endings
Patch Set #1, Line 50: typedef struct {
DOS line endings
Patch Set #1, Line 51: uint8_t StmSpecVerMajor;
DOS line endings
Patch Set #1, Line 51: uint8_t StmSpecVerMajor;
please, no spaces at the start of a line
Patch Set #1, Line 52: uint8_t StmSpecVerMinor;
DOS line endings
Patch Set #1, Line 52: uint8_t StmSpecVerMinor;
please, no spaces at the start of a line
Patch Set #1, Line 53: uint16_t Reserved; // must be zero
trailing whitespace
Patch Set #1, Line 53: uint16_t Reserved; // must be zero
please, no spaces at the start of a line
Patch Set #1, Line 54: uint32_t StaticImageSize;
DOS line endings
Patch Set #1, Line 54: uint32_t StaticImageSize;
please, no spaces at the start of a line
Patch Set #1, Line 55: uint32_t PerProcDynamicMemorySize;
DOS line endings
Patch Set #1, Line 55: uint32_t PerProcDynamicMemorySize;
please, no spaces at the start of a line
Patch Set #1, Line 56: uint32_t AdditionalDynamicMemorySize;
DOS line endings
Patch Set #1, Line 56: uint32_t AdditionalDynamicMemorySize;
please, no spaces at the start of a line
Patch Set #1, Line 57: STM_FEAT StmFeatures;
DOS line endings
Patch Set #1, Line 57: STM_FEAT StmFeatures;
please, no spaces at the start of a line
Patch Set #1, Line 58: uint32_t NumberOfRevIDs;
DOS line endings
Patch Set #1, Line 58: uint32_t NumberOfRevIDs;
please, no spaces at the start of a line
Patch Set #1, Line 59: uint32_t StmSmmRevID[1];
DOS line endings
Patch Set #1, Line 59: uint32_t StmSmmRevID[1];
please, no spaces at the start of a line
trailing whitespace
Patch Set #1, Line 61: // The total STM_HEADER should be 4K.
trailing whitespace
trailing whitespace
Patch Set #1, Line 63: } SOFTWARE_STM_HEADER;
DOS line endings
DOS line endings
Patch Set #1, Line 65: typedef struct {
DOS line endings
Patch Set #1, Line 66: HARDWARE_STM_HEADER HwStmHdr;
DOS line endings
Patch Set #1, Line 66: HARDWARE_STM_HEADER HwStmHdr;
please, no spaces at the start of a line
Patch Set #1, Line 67: SOFTWARE_STM_HEADER SwStmHdr;
DOS line endings
Patch Set #1, Line 67: SOFTWARE_STM_HEADER SwStmHdr;
please, no spaces at the start of a line
Patch Set #1, Line 68: } STM_HEADER;
DOS line endings
DOS line endings
Patch Set #1, Line 70: #define SHA1 1
DOS line endings
Patch Set #1, Line 71: #define SHA256 2
DOS line endings
Patch Set #1, Line 72: typedef struct {
DOS line endings
Patch Set #1, Line 73: uint64_t BiosComponentBase;
DOS line endings
Patch Set #1, Line 73: uint64_t BiosComponentBase;
please, no spaces at the start of a line
Patch Set #1, Line 74: uint32_t ImageSize;
DOS line endings
Patch Set #1, Line 74: uint32_t ImageSize;
please, no spaces at the start of a line
Patch Set #1, Line 75: uint32_t HashAlgorithm; // SHA1 or SHA256
trailing whitespace
Patch Set #1, Line 75: uint32_t HashAlgorithm; // SHA1 or SHA256
please, no spaces at the start of a line
Patch Set #1, Line 76: uint8_t Hash[32];
DOS line endings
Patch Set #1, Line 76: uint8_t Hash[32];
please, no spaces at the start of a line
Patch Set #1, Line 77: } TXT_BIOS_COMPONENT_STATUS;
DOS line endings
DOS line endings
Patch Set #1, Line 79: #define PAGE_SIZE 4096
DOS line endings
Patch Set #1, Line 80: typedef struct {
DOS line endings
Patch Set #1, Line 81: uint32_t ImageSize;
DOS line endings
Patch Set #1, Line 81: uint32_t ImageSize;
please, no spaces at the start of a line
Patch Set #1, Line 82: uint32_t Reserved;
DOS line endings
Patch Set #1, Line 82: uint32_t Reserved;
please, no spaces at the start of a line
Patch Set #1, Line 83: uint64_t ImagePageBase[1]; //[NumberOfPages];
trailing whitespace
Patch Set #1, Line 83: uint64_t ImagePageBase[1]; //[NumberOfPages];
please, no spaces at the start of a line
Patch Set #1, Line 84: } TXT_BIOS_COMPONENT_UPDATE;
DOS line endings
DOS line endings
Patch Set #1, Line 86: // If (ImageSizeInBytes % PAGE_SIZE == 0) {
trailing whitespace
Patch Set #1, Line 87: // NumberOfPages = ImageSizeInBytes / PAGE_SIZE
trailing whitespace
Patch Set #1, Line 88: // } else {
trailing whitespace
Patch Set #1, Line 89: // NumberOfPages = ImageSizeInBytes / PAGE_SIZE + 1
trailing whitespace
trailing whitespace
DOS line endings
DOS line endings
Patch Set #1, Line 93: typedef struct {
DOS line endings
Patch Set #1, Line 94: uint64_t SpeRip;
DOS line endings
Patch Set #1, Line 94: uint64_t SpeRip;
please, no spaces at the start of a line
Patch Set #1, Line 95: uint64_t SpeRsp;
DOS line endings
Patch Set #1, Line 95: uint64_t SpeRsp;
please, no spaces at the start of a line
Patch Set #1, Line 96: uint16_t SpeSs;
DOS line endings
Patch Set #1, Line 96: uint16_t SpeSs;
please, no spaces at the start of a line
Patch Set #1, Line 97: uint16_t PageViolationException:1;
DOS line endings
Patch Set #1, Line 97: uint16_t PageViolationException:1;
please, no spaces at the start of a line
Patch Set #1, Line 98: uint16_t MsrViolationException:1;
DOS line endings
Patch Set #1, Line 98: uint16_t MsrViolationException:1;
please, no spaces at the start of a line
Patch Set #1, Line 99: uint16_t RegisterViolationException:1;
DOS line endings
Patch Set #1, Line 99: uint16_t RegisterViolationException:1;
please, no spaces at the start of a line
Patch Set #1, Line 100: uint16_t IoViolationException:1;
DOS line endings
Patch Set #1, Line 100: uint16_t IoViolationException:1;
please, no spaces at the start of a line
Patch Set #1, Line 101: uint16_t PciViolationException:1;
DOS line endings
Patch Set #1, Line 101: uint16_t PciViolationException:1;
please, no spaces at the start of a line
Patch Set #1, Line 102: uint16_t Reserved1:11;
DOS line endings
Patch Set #1, Line 102: uint16_t Reserved1:11;
please, no spaces at the start of a line
Patch Set #1, Line 103: uint32_t Reserved2;
DOS line endings
Patch Set #1, Line 103: uint32_t Reserved2;
please, no spaces at the start of a line
Patch Set #1, Line 104: } STM_PROTECTION_EXCEPTION_HANDLER;
DOS line endings
DOS line endings
Patch Set #1, Line 106: typedef struct {
DOS line endings
Patch Set #1, Line 107: uint8_t ExecutionDisableOutsideSmrr:1;
DOS line endings
Patch Set #1, Line 107: uint8_t ExecutionDisableOutsideSmrr:1;
please, no spaces at the start of a line
Patch Set #1, Line 108: uint8_t Intel64Mode:1;
DOS line endings
Patch Set #1, Line 108: uint8_t Intel64Mode:1;
please, no spaces at the start of a line
Patch Set #1, Line 109: uint8_t Cr4Pae : 1;
DOS line endings
Patch Set #1, Line 109: uint8_t Cr4Pae : 1;
please, no spaces at the start of a line
Patch Set #1, Line 110: uint8_t Cr4Pse : 1;
DOS line endings
Patch Set #1, Line 110: uint8_t Cr4Pse : 1;
please, no spaces at the start of a line
Patch Set #1, Line 111: uint8_t Reserved1 : 4;
DOS line endings
Patch Set #1, Line 111: uint8_t Reserved1 : 4;
please, no spaces at the start of a line
Patch Set #1, Line 112: } STM_SMM_ENTRY_STATE;
DOS line endings
DOS line endings
Patch Set #1, Line 114: typedef struct {
DOS line endings
Patch Set #1, Line 115: uint8_t SmramToVmcsRestoreRequired : 1; // BIOS restore hint
trailing whitespace
Patch Set #1, Line 115: uint8_t SmramToVmcsRestoreRequired : 1; // BIOS restore hint
line over 80 characters
Patch Set #1, Line 115: uint8_t SmramToVmcsRestoreRequired : 1; // BIOS restore hint
please, no spaces at the start of a line
Patch Set #1, Line 116: uint8_t ReinitializeVmcsRequired : 1; // BIOS request
trailing whitespace
Patch Set #1, Line 116: uint8_t ReinitializeVmcsRequired : 1; // BIOS request
line over 80 characters
Patch Set #1, Line 116: uint8_t ReinitializeVmcsRequired : 1; // BIOS request
please, no spaces at the start of a line
Patch Set #1, Line 117: uint8_t Reserved2 : 6;
DOS line endings
Patch Set #1, Line 117: uint8_t Reserved2 : 6;
please, no spaces at the start of a line
Patch Set #1, Line 118: } STM_SMM_RESUME_STATE;
DOS line endings
DOS line endings
Patch Set #1, Line 120: typedef struct {
DOS line endings
Patch Set #1, Line 121: uint8_t DomainType : 4; // STM input to BIOS on each SMI
trailing whitespace
Patch Set #1, Line 121: uint8_t DomainType : 4; // STM input to BIOS on each SMI
line over 80 characters
Patch Set #1, Line 121: uint8_t DomainType : 4; // STM input to BIOS on each SMI
please, no spaces at the start of a line
Patch Set #1, Line 122: uint8_t XStatePolicy : 2; // STM input to BIOS on each SMI
trailing whitespace
Patch Set #1, Line 122: uint8_t XStatePolicy : 2; // STM input to BIOS on each SMI
line over 80 characters
Patch Set #1, Line 122: uint8_t XStatePolicy : 2; // STM input to BIOS on each SMI
please, no spaces at the start of a line
Patch Set #1, Line 123: uint8_t EptEnabled : 1;
DOS line endings
Patch Set #1, Line 123: uint8_t EptEnabled : 1;
please, no spaces at the start of a line
Patch Set #1, Line 124: uint8_t Reserved3 : 1;
DOS line endings
Patch Set #1, Line 124: uint8_t Reserved3 : 1;
please, no spaces at the start of a line
Patch Set #1, Line 125: } STM_SMM_STATE;
DOS line endings
DOS line endings
Patch Set #1, Line 127: typedef struct {
DOS line endings
Patch Set #1, Line 128: uint64_t Signature;
DOS line endings
Patch Set #1, Line 128: uint64_t Signature;
please, no spaces at the start of a line
Patch Set #1, Line 129: uint16_t Size;
DOS line endings
Patch Set #1, Line 129: uint16_t Size;
please, no spaces at the start of a line
Patch Set #1, Line 130: uint8_t SmmDescriptorVerMajor;
DOS line endings
Patch Set #1, Line 130: uint8_t SmmDescriptorVerMajor;
please, no spaces at the start of a line
Patch Set #1, Line 131: uint8_t SmmDescriptorVerMinor;
DOS line endings
Patch Set #1, Line 131: uint8_t SmmDescriptorVerMinor;
please, no spaces at the start of a line
Patch Set #1, Line 132: uint32_t LocalApicId;
DOS line endings
Patch Set #1, Line 132: uint32_t LocalApicId;
please, no spaces at the start of a line
Patch Set #1, Line 133: STM_SMM_ENTRY_STATE SmmEntryState;
DOS line endings
Patch Set #1, Line 133: STM_SMM_ENTRY_STATE SmmEntryState;
please, no spaces at the start of a line
Patch Set #1, Line 134: STM_SMM_RESUME_STATE SmmResumeState;
DOS line endings
Patch Set #1, Line 134: STM_SMM_RESUME_STATE SmmResumeState;
please, no spaces at the start of a line
Patch Set #1, Line 135: STM_SMM_STATE StmSmmState;
DOS line endings
Patch Set #1, Line 135: STM_SMM_STATE StmSmmState;
please, no spaces at the start of a line
Patch Set #1, Line 136: uint8_t Reserved4;
DOS line endings
Patch Set #1, Line 136: uint8_t Reserved4;
please, no spaces at the start of a line
Patch Set #1, Line 137: uint16_t SmmCs;
DOS line endings
Patch Set #1, Line 137: uint16_t SmmCs;
please, no spaces at the start of a line
Patch Set #1, Line 138: uint16_t SmmDs;
DOS line endings
Patch Set #1, Line 138: uint16_t SmmDs;
please, no spaces at the start of a line
Patch Set #1, Line 139: uint16_t SmmSs;
DOS line endings
Patch Set #1, Line 139: uint16_t SmmSs;
please, no spaces at the start of a line
Patch Set #1, Line 140: uint16_t SmmOtherSegment;
DOS line endings
Patch Set #1, Line 140: uint16_t SmmOtherSegment;
please, no spaces at the start of a line
Patch Set #1, Line 141: uint16_t SmmTr;
DOS line endings
Patch Set #1, Line 141: uint16_t SmmTr;
please, no spaces at the start of a line
Patch Set #1, Line 142: uint16_t Reserved5;
DOS line endings
Patch Set #1, Line 142: uint16_t Reserved5;
please, no spaces at the start of a line
Patch Set #1, Line 143: uint64_t SmmCr3;
DOS line endings
Patch Set #1, Line 143: uint64_t SmmCr3;
please, no spaces at the start of a line
Patch Set #1, Line 144: uint64_t SmmStmSetupRip;
DOS line endings
Patch Set #1, Line 144: uint64_t SmmStmSetupRip;
please, no spaces at the start of a line
Patch Set #1, Line 145: uint64_t SmmStmTeardownRip;
DOS line endings
Patch Set #1, Line 145: uint64_t SmmStmTeardownRip;
please, no spaces at the start of a line
Patch Set #1, Line 146: uint64_t SmmSmiHandlerRip;
DOS line endings
Patch Set #1, Line 146: uint64_t SmmSmiHandlerRip;
please, no spaces at the start of a line
Patch Set #1, Line 147: uint64_t SmmSmiHandlerRsp;
DOS line endings
Patch Set #1, Line 147: uint64_t SmmSmiHandlerRsp;
please, no spaces at the start of a line
Patch Set #1, Line 148: uint64_t SmmGdtPtr;
DOS line endings
Patch Set #1, Line 148: uint64_t SmmGdtPtr;
please, no spaces at the start of a line
Patch Set #1, Line 149: uint32_t SmmGdtSize;
DOS line endings
Patch Set #1, Line 149: uint32_t SmmGdtSize;
please, no spaces at the start of a line
Patch Set #1, Line 150: uint32_t RequiredStmSmmRevId;
DOS line endings
Patch Set #1, Line 150: uint32_t RequiredStmSmmRevId;
please, no spaces at the start of a line
Patch Set #1, Line 151: STM_PROTECTION_EXCEPTION_HANDLER StmProtectionExceptionHandler;
DOS line endings
Patch Set #1, Line 151: STM_PROTECTION_EXCEPTION_HANDLER StmProtectionExceptionHandler;
please, no spaces at the start of a line
Patch Set #1, Line 152: uint64_t Reserved6;
DOS line endings
Patch Set #1, Line 152: uint64_t Reserved6;
please, no spaces at the start of a line
Patch Set #1, Line 153: uint64_t BiosHwResourceRequirementsPtr;
DOS line endings
Patch Set #1, Line 153: uint64_t BiosHwResourceRequirementsPtr;
please, no spaces at the start of a line
Patch Set #1, Line 154: // extend area
trailing whitespace
Patch Set #1, Line 155: uint64_t AcpiRsdp;
DOS line endings
Patch Set #1, Line 155: uint64_t AcpiRsdp;
please, no spaces at the start of a line
Patch Set #1, Line 156: uint8_t PhysicalAddressBits;
DOS line endings
Patch Set #1, Line 156: uint8_t PhysicalAddressBits;
please, no spaces at the start of a line
Patch Set #1, Line 157: } TXT_PROCESSOR_SMM_DESCRIPTOR;
DOS line endings
DOS line endings
Patch Set #1, Line 159: #define TXT_PROCESSOR_SMM_DESCRIPTOR_SIGNATURE "TXTPSSIG"
DOS line endings
Patch Set #1, Line 160: #define TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MAJOR 1
DOS line endings
Patch Set #1, Line 161: #define TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MINOR 0
DOS line endings
DOS line endings
Patch Set #1, Line 163: #define SMM_PSD_OFFSET 0xfb00
DOS line endings
DOS line endings
Patch Set #1, Line 165: typedef enum {
DOS line endings
Patch Set #1, Line 166: TxtSmmPageViolation = 1,
DOS line endings
Patch Set #1, Line 166: TxtSmmPageViolation = 1,
please, no spaces at the start of a line
Patch Set #1, Line 167: TxtSmmMsrViolation,
DOS line endings
Patch Set #1, Line 167: TxtSmmMsrViolation,
please, no spaces at the start of a line
Patch Set #1, Line 168: TxtSmmRegisterViolation,
DOS line endings
Patch Set #1, Line 168: TxtSmmRegisterViolation,
please, no spaces at the start of a line
Patch Set #1, Line 169: TxtSmmIoViolation,
DOS line endings
Patch Set #1, Line 169: TxtSmmIoViolation,
please, no spaces at the start of a line
Patch Set #1, Line 170: TxtSmmPciViolation
DOS line endings
Patch Set #1, Line 170: TxtSmmPciViolation
please, no spaces at the start of a line
Patch Set #1, Line 171: } TXT_SMM_PROTECTION_EXCEPTION_TYPE;
DOS line endings
DOS line endings
Patch Set #1, Line 173: typedef struct {
DOS line endings
Patch Set #1, Line 174: uint32_t Rdi;
DOS line endings
Patch Set #1, Line 174: uint32_t Rdi;
please, no spaces at the start of a line
Patch Set #1, Line 175: uint32_t Rsi;
DOS line endings
Patch Set #1, Line 175: uint32_t Rsi;
please, no spaces at the start of a line
Patch Set #1, Line 176: uint32_t Rbp;
DOS line endings
Patch Set #1, Line 176: uint32_t Rbp;
please, no spaces at the start of a line
Patch Set #1, Line 177: uint32_t Rdx;
DOS line endings
Patch Set #1, Line 177: uint32_t Rdx;
please, no spaces at the start of a line
Patch Set #1, Line 178: uint32_t Rcx;
DOS line endings
Patch Set #1, Line 178: uint32_t Rcx;
please, no spaces at the start of a line
Patch Set #1, Line 179: uint32_t Rbx;
DOS line endings
Patch Set #1, Line 179: uint32_t Rbx;
please, no spaces at the start of a line
Patch Set #1, Line 180: uint32_t Rax;
DOS line endings
Patch Set #1, Line 180: uint32_t Rax;
please, no spaces at the start of a line
Patch Set #1, Line 181: uint32_t Cr3;
DOS line endings
Patch Set #1, Line 181: uint32_t Cr3;
please, no spaces at the start of a line
Patch Set #1, Line 182: uint32_t Cr2;
DOS line endings
Patch Set #1, Line 182: uint32_t Cr2;
please, no spaces at the start of a line
Patch Set #1, Line 183: uint32_t Cr0;
DOS line endings
Patch Set #1, Line 183: uint32_t Cr0;
please, no spaces at the start of a line
Patch Set #1, Line 184: uint32_t VmcsExitInstructionInfo;
DOS line endings
Patch Set #1, Line 184: uint32_t VmcsExitInstructionInfo;
please, no spaces at the start of a line
Patch Set #1, Line 185: uint32_t VmcsExitInstructionLength;
DOS line endings
Patch Set #1, Line 185: uint32_t VmcsExitInstructionLength;
please, no spaces at the start of a line
Patch Set #1, Line 186: uint64_t VmcsExitQualification;
DOS line endings
Patch Set #1, Line 186: uint64_t VmcsExitQualification;
please, no spaces at the start of a line
Patch Set #1, Line 187: uint32_t ErrorCode; // TXT_SMM_PROTECTION_EXCEPTION_TYPE
trailing whitespace
Patch Set #1, Line 187: uint32_t ErrorCode; // TXT_SMM_PROTECTION_EXCEPTION_TYPE
please, no spaces at the start of a line
Patch Set #1, Line 188: uint32_t Rip;
DOS line endings
Patch Set #1, Line 188: uint32_t Rip;
please, no spaces at the start of a line
Patch Set #1, Line 189: uint32_t Cs;
DOS line endings
Patch Set #1, Line 189: uint32_t Cs;
please, no spaces at the start of a line
Patch Set #1, Line 190: uint32_t Rflags;
DOS line endings
Patch Set #1, Line 190: uint32_t Rflags;
please, no spaces at the start of a line
Patch Set #1, Line 191: uint32_t Rsp;
DOS line endings
Patch Set #1, Line 191: uint32_t Rsp;
please, no spaces at the start of a line
Patch Set #1, Line 192: uint32_t Ss;
DOS line endings
Patch Set #1, Line 192: uint32_t Ss;
please, no spaces at the start of a line
Patch Set #1, Line 193: } STM_PROTECTION_EXCEPTION_STACK_FRAME_IA32;
DOS line endings
DOS line endings
Patch Set #1, Line 195: typedef struct {
DOS line endings
Patch Set #1, Line 196: uint64_t R15;
DOS line endings
Patch Set #1, Line 196: uint64_t R15;
please, no spaces at the start of a line
Patch Set #1, Line 197: uint64_t R14;
DOS line endings
Patch Set #1, Line 197: uint64_t R14;
please, no spaces at the start of a line
Patch Set #1, Line 198: uint64_t R13;
DOS line endings
Patch Set #1, Line 198: uint64_t R13;
please, no spaces at the start of a line
Patch Set #1, Line 199: uint64_t R12;
DOS line endings
Patch Set #1, Line 199: uint64_t R12;
please, no spaces at the start of a line
Patch Set #1, Line 200: uint64_t R11;
DOS line endings
Patch Set #1, Line 200: uint64_t R11;
please, no spaces at the start of a line
Patch Set #1, Line 201: uint64_t R10;
DOS line endings
Patch Set #1, Line 201: uint64_t R10;
please, no spaces at the start of a line
Patch Set #1, Line 202: uint64_t R9;
DOS line endings
Patch Set #1, Line 202: uint64_t R9;
please, no spaces at the start of a line
Patch Set #1, Line 203: uint64_t R8;
DOS line endings
Patch Set #1, Line 203: uint64_t R8;
please, no spaces at the start of a line
Patch Set #1, Line 204: uint64_t Rdi;
DOS line endings
Patch Set #1, Line 204: uint64_t Rdi;
please, no spaces at the start of a line
Patch Set #1, Line 205: uint64_t Rsi;
DOS line endings
Patch Set #1, Line 205: uint64_t Rsi;
please, no spaces at the start of a line
Patch Set #1, Line 206: uint64_t Rbp;
DOS line endings
Patch Set #1, Line 206: uint64_t Rbp;
please, no spaces at the start of a line
Patch Set #1, Line 207: uint64_t Rdx;
DOS line endings
Patch Set #1, Line 207: uint64_t Rdx;
please, no spaces at the start of a line
Patch Set #1, Line 208: uint64_t Rcx;
DOS line endings
Patch Set #1, Line 208: uint64_t Rcx;
please, no spaces at the start of a line
Patch Set #1, Line 209: uint64_t Rbx;
DOS line endings
Patch Set #1, Line 209: uint64_t Rbx;
please, no spaces at the start of a line
Patch Set #1, Line 210: uint64_t Rax;
DOS line endings
Patch Set #1, Line 210: uint64_t Rax;
please, no spaces at the start of a line
Patch Set #1, Line 211: uint64_t Cr8;
DOS line endings
Patch Set #1, Line 211: uint64_t Cr8;
please, no spaces at the start of a line
Patch Set #1, Line 212: uint64_t Cr3;
DOS line endings
Patch Set #1, Line 212: uint64_t Cr3;
please, no spaces at the start of a line
Patch Set #1, Line 213: uint64_t Cr2;
DOS line endings
Patch Set #1, Line 213: uint64_t Cr2;
please, no spaces at the start of a line
Patch Set #1, Line 214: uint64_t Cr0;
DOS line endings
Patch Set #1, Line 214: uint64_t Cr0;
please, no spaces at the start of a line
Patch Set #1, Line 215: uint64_t VmcsExitInstructionInfo;
DOS line endings
Patch Set #1, Line 215: uint64_t VmcsExitInstructionInfo;
please, no spaces at the start of a line
Patch Set #1, Line 216: uint64_t VmcsExitInstructionLength;
DOS line endings
Patch Set #1, Line 216: uint64_t VmcsExitInstructionLength;
please, no spaces at the start of a line
Patch Set #1, Line 217: uint64_t VmcsExitQualification;
DOS line endings
Patch Set #1, Line 217: uint64_t VmcsExitQualification;
please, no spaces at the start of a line
Patch Set #1, Line 218: uint64_t ErrorCode; // TXT_SMM_PROTECTION_EXCEPTION_TYPE
trailing whitespace
Patch Set #1, Line 218: uint64_t ErrorCode; // TXT_SMM_PROTECTION_EXCEPTION_TYPE
please, no spaces at the start of a line
Patch Set #1, Line 219: uint64_t Rip;
DOS line endings
Patch Set #1, Line 219: uint64_t Rip;
please, no spaces at the start of a line
Patch Set #1, Line 220: uint64_t Cs;
DOS line endings
Patch Set #1, Line 220: uint64_t Cs;
please, no spaces at the start of a line
Patch Set #1, Line 221: uint64_t Rflags;
DOS line endings
Patch Set #1, Line 221: uint64_t Rflags;
please, no spaces at the start of a line
Patch Set #1, Line 222: uint64_t Rsp;
DOS line endings
Patch Set #1, Line 222: uint64_t Rsp;
please, no spaces at the start of a line
Patch Set #1, Line 223: uint64_t Ss;
DOS line endings
Patch Set #1, Line 223: uint64_t Ss;
please, no spaces at the start of a line
Patch Set #1, Line 224: } STM_PROTECTION_EXCEPTION_STACK_FRAME_X64;
DOS line endings
DOS line endings
Patch Set #1, Line 226: typedef union {
DOS line endings
Patch Set #1, Line 227: STM_PROTECTION_EXCEPTION_STACK_FRAME_IA32 *Ia32StackFrame;
DOS line endings
Patch Set #1, Line 227: STM_PROTECTION_EXCEPTION_STACK_FRAME_IA32 *Ia32StackFrame;
please, no spaces at the start of a line
Patch Set #1, Line 228: STM_PROTECTION_EXCEPTION_STACK_FRAME_X64 *X64StackFrame;
DOS line endings
Patch Set #1, Line 228: STM_PROTECTION_EXCEPTION_STACK_FRAME_X64 *X64StackFrame;
please, no spaces at the start of a line
Patch Set #1, Line 229: } STM_PROTECTION_EXCEPTION_STACK_FRAME;
DOS line endings
DOS line endings
Patch Set #1, Line 231: #define STM_SMM_REV_ID 0x80010100
DOS line endings
DOS line endings
Patch Set #1, Line 233: typedef struct _STM_SMM_CPU_STATE {
DOS line endings
Patch Set #1, Line 234: uint8_t Reserved1[0x1d0]; // fc00h
trailing whitespace
Patch Set #1, Line 234: uint8_t Reserved1[0x1d0]; // fc00h
please, no spaces at the start of a line
Patch Set #1, Line 235: uint32_t GdtBaseHiDword; // fdd0h : NO
trailing whitespace
Patch Set #1, Line 235: uint32_t GdtBaseHiDword; // fdd0h : NO
please, no spaces at the start of a line
Patch Set #1, Line 236: uint32_t LdtBaseHiDword; // fdd4h : NO
trailing whitespace
Patch Set #1, Line 236: uint32_t LdtBaseHiDword; // fdd4h : NO
please, no spaces at the start of a line
Patch Set #1, Line 237: uint32_t IdtBaseHiDword; // fdd8h : NO
trailing whitespace
Patch Set #1, Line 237: uint32_t IdtBaseHiDword; // fdd8h : NO
please, no spaces at the start of a line
Patch Set #1, Line 238: uint8_t Reserved2[0x4]; // fddch
trailing whitespace
Patch Set #1, Line 238: uint8_t Reserved2[0x4]; // fddch
please, no spaces at the start of a line
Patch Set #1, Line 239: uint64_t IoRdi; // fde0h : NO - restricted
trailing whitespace
Patch Set #1, Line 239: uint64_t IoRdi; // fde0h : NO - restricted
line over 80 characters
Patch Set #1, Line 239: uint64_t IoRdi; // fde0h : NO - restricted
please, no spaces at the start of a line
Patch Set #1, Line 240: uint64_t IoEip; // fde8h : YES
trailing whitespace
Patch Set #1, Line 240: uint64_t IoEip; // fde8h : YES
please, no spaces at the start of a line
Patch Set #1, Line 241: uint64_t IoRcx; // fdf0h : NO - restricted
trailing whitespace
Patch Set #1, Line 241: uint64_t IoRcx; // fdf0h : NO - restricted
line over 80 characters
Patch Set #1, Line 241: uint64_t IoRcx; // fdf0h : NO - restricted
please, no spaces at the start of a line
Patch Set #1, Line 242: uint64_t IoRsi; // fdf8h : NO - restricted
trailing whitespace
Patch Set #1, Line 242: uint64_t IoRsi; // fdf8h : NO - restricted
line over 80 characters
Patch Set #1, Line 242: uint64_t IoRsi; // fdf8h : NO - restricted
please, no spaces at the start of a line
Patch Set #1, Line 243: uint8_t Reserved3[0x40]; // fe00h
trailing whitespace
Patch Set #1, Line 243: uint8_t Reserved3[0x40]; // fe00h
please, no spaces at the start of a line
Patch Set #1, Line 244: uint32_t Cr4; // fe40h : NO
trailing whitespace
Patch Set #1, Line 244: uint32_t Cr4; // fe40h : NO
please, no spaces at the start of a line
Patch Set #1, Line 245: uint8_t Reserved4[0x48]; // fe44h
trailing whitespace
Patch Set #1, Line 245: uint8_t Reserved4[0x48]; // fe44h
please, no spaces at the start of a line
Patch Set #1, Line 246: uint32_t GdtBaseLoDword; // fe8ch : NO
trailing whitespace
Patch Set #1, Line 246: uint32_t GdtBaseLoDword; // fe8ch : NO
please, no spaces at the start of a line
Patch Set #1, Line 247: uint32_t GdtLimit; // fe90h : NO - RESTRICTED
trailing whitespace
Patch Set #1, Line 247: uint32_t GdtLimit; // fe90h : NO - RESTRICTED
line over 80 characters
Patch Set #1, Line 247: uint32_t GdtLimit; // fe90h : NO - RESTRICTED
please, no spaces at the start of a line
Patch Set #1, Line 248: uint32_t IdtBaseLoDword; // fe94h : NO
trailing whitespace
Patch Set #1, Line 248: uint32_t IdtBaseLoDword; // fe94h : NO
please, no spaces at the start of a line
Patch Set #1, Line 249: uint32_t IdtLimit; // fe98h : NO - RESTRICTED
trailing whitespace
Patch Set #1, Line 249: uint32_t IdtLimit; // fe98h : NO - RESTRICTED
line over 80 characters
Patch Set #1, Line 249: uint32_t IdtLimit; // fe98h : NO - RESTRICTED
please, no spaces at the start of a line
Patch Set #1, Line 250: uint32_t LdtBaseLoDword; // fe9ch : NO
trailing whitespace
Patch Set #1, Line 250: uint32_t LdtBaseLoDword; // fe9ch : NO
please, no spaces at the start of a line
Patch Set #1, Line 251: uint32_t LdtLimit; // fea0h : NO - RESTRICTED
trailing whitespace
Patch Set #1, Line 251: uint32_t LdtLimit; // fea0h : NO - RESTRICTED
line over 80 characters
Patch Set #1, Line 251: uint32_t LdtLimit; // fea0h : NO - RESTRICTED
please, no spaces at the start of a line
Patch Set #1, Line 252: uint32_t LdtInfo; // fea4h : NO - RESTRICTED
trailing whitespace
Patch Set #1, Line 252: uint32_t LdtInfo; // fea4h : NO - RESTRICTED
line over 80 characters
Patch Set #1, Line 252: uint32_t LdtInfo; // fea4h : NO - RESTRICTED
please, no spaces at the start of a line
Patch Set #1, Line 253: uint8_t Reserved5[0x30]; // fea8h
trailing whitespace
Patch Set #1, Line 253: uint8_t Reserved5[0x30]; // fea8h
please, no spaces at the start of a line
Patch Set #1, Line 254: uint64_t Eptp; // fed8h : NO
trailing whitespace
Patch Set #1, Line 254: uint64_t Eptp; // fed8h : NO
please, no spaces at the start of a line
Patch Set #1, Line 255: uint32_t EnabledEPT; // fee0h : NO
trailing whitespace
Patch Set #1, Line 255: uint32_t EnabledEPT; // fee0h : NO
please, no spaces at the start of a line
Patch Set #1, Line 256: uint8_t Reserved6[0x14]; // fee4h
trailing whitespace
Patch Set #1, Line 256: uint8_t Reserved6[0x14]; // fee4h
please, no spaces at the start of a line
Patch Set #1, Line 257: uint32_t Smbase; // fef8h : YES - NO for STM
trailing whitespace
Patch Set #1, Line 257: uint32_t Smbase; // fef8h : YES - NO for STM
line over 80 characters
Patch Set #1, Line 257: uint32_t Smbase; // fef8h : YES - NO for STM
please, no spaces at the start of a line
Patch Set #1, Line 258: uint32_t SMMRevId; // fefch : NO
trailing whitespace
Patch Set #1, Line 258: uint32_t SMMRevId; // fefch : NO
please, no spaces at the start of a line
Patch Set #1, Line 259: uint16_t IORestart; // ff00h : YES
trailing whitespace
Patch Set #1, Line 259: uint16_t IORestart; // ff00h : YES
please, no spaces at the start of a line
Patch Set #1, Line 260: uint16_t AutoHALTRestart; // ff02h : YES
trailing whitespace
Patch Set #1, Line 260: uint16_t AutoHALTRestart; // ff02h : YES
please, no spaces at the start of a line
Patch Set #1, Line 261: uint8_t Reserved7[0x18]; // ff04h
trailing whitespace
Patch Set #1, Line 261: uint8_t Reserved7[0x18]; // ff04h
please, no spaces at the start of a line
Patch Set #1, Line 262: uint64_t R15; // ff1ch : YES
trailing whitespace
Patch Set #1, Line 262: uint64_t R15; // ff1ch : YES
please, no spaces at the start of a line
Patch Set #1, Line 263: uint64_t R14; // ff24h : YES
trailing whitespace
Patch Set #1, Line 263: uint64_t R14; // ff24h : YES
please, no spaces at the start of a line
Patch Set #1, Line 264: uint64_t R13; // ff2ch : YES
trailing whitespace
Patch Set #1, Line 264: uint64_t R13; // ff2ch : YES
please, no spaces at the start of a line
Patch Set #1, Line 265: uint64_t R12; // ff34h : YES
trailing whitespace
Patch Set #1, Line 265: uint64_t R12; // ff34h : YES
please, no spaces at the start of a line
Patch Set #1, Line 266: uint64_t R11; // ff3ch : YES
trailing whitespace
Patch Set #1, Line 266: uint64_t R11; // ff3ch : YES
please, no spaces at the start of a line
Patch Set #1, Line 267: uint64_t R10; // ff44h : YES
trailing whitespace
Patch Set #1, Line 267: uint64_t R10; // ff44h : YES
please, no spaces at the start of a line
Patch Set #1, Line 268: uint64_t R9; // ff4ch : YES
trailing whitespace
Patch Set #1, Line 268: uint64_t R9; // ff4ch : YES
please, no spaces at the start of a line
Patch Set #1, Line 269: uint64_t R8; // ff54h : YES
trailing whitespace
Patch Set #1, Line 269: uint64_t R8; // ff54h : YES
please, no spaces at the start of a line
Patch Set #1, Line 270: uint64_t Rax; // ff5ch : YES
trailing whitespace
Patch Set #1, Line 270: uint64_t Rax; // ff5ch : YES
please, no spaces at the start of a line
Patch Set #1, Line 271: uint64_t Rcx; // ff64h : YES
trailing whitespace
Patch Set #1, Line 271: uint64_t Rcx; // ff64h : YES
please, no spaces at the start of a line
Patch Set #1, Line 272: uint64_t Rdx; // ff6ch : YES
trailing whitespace
Patch Set #1, Line 272: uint64_t Rdx; // ff6ch : YES
please, no spaces at the start of a line
Patch Set #1, Line 273: uint64_t Rbx; // ff74h : YES
trailing whitespace
Patch Set #1, Line 273: uint64_t Rbx; // ff74h : YES
please, no spaces at the start of a line
Patch Set #1, Line 274: uint64_t Rsp; // ff7ch : YES
trailing whitespace
Patch Set #1, Line 274: uint64_t Rsp; // ff7ch : YES
please, no spaces at the start of a line
Patch Set #1, Line 275: uint64_t Rbp; // ff84h : YES
trailing whitespace
Patch Set #1, Line 275: uint64_t Rbp; // ff84h : YES
please, no spaces at the start of a line
Patch Set #1, Line 276: uint64_t Rsi; // ff8ch : YES
trailing whitespace
Patch Set #1, Line 276: uint64_t Rsi; // ff8ch : YES
please, no spaces at the start of a line
Patch Set #1, Line 277: uint64_t Rdi; // ff94h : YES
trailing whitespace
Patch Set #1, Line 277: uint64_t Rdi; // ff94h : YES
please, no spaces at the start of a line
Patch Set #1, Line 278: uint64_t IOMemAddr; // ff9ch : NO
trailing whitespace
Patch Set #1, Line 278: uint64_t IOMemAddr; // ff9ch : NO
please, no spaces at the start of a line
Patch Set #1, Line 279: uint32_t IOMisc; // ffa4h : NO
trailing whitespace
Patch Set #1, Line 279: uint32_t IOMisc; // ffa4h : NO
please, no spaces at the start of a line
Patch Set #1, Line 280: uint32_t Es; // ffa8h : NO
trailing whitespace
Patch Set #1, Line 280: uint32_t Es; // ffa8h : NO
please, no spaces at the start of a line
Patch Set #1, Line 281: uint32_t Cs; // ffach : NO
trailing whitespace
Patch Set #1, Line 281: uint32_t Cs; // ffach : NO
please, no spaces at the start of a line
Patch Set #1, Line 282: uint32_t Ss; // ffb0h : NO
trailing whitespace
Patch Set #1, Line 282: uint32_t Ss; // ffb0h : NO
please, no spaces at the start of a line
Patch Set #1, Line 283: uint32_t Ds; // ffb4h : NO
trailing whitespace
Patch Set #1, Line 283: uint32_t Ds; // ffb4h : NO
please, no spaces at the start of a line
Patch Set #1, Line 284: uint32_t Fs; // ffb8h : NO
trailing whitespace
Patch Set #1, Line 284: uint32_t Fs; // ffb8h : NO
please, no spaces at the start of a line
Patch Set #1, Line 285: uint32_t Gs; // ffbch : NO
trailing whitespace
Patch Set #1, Line 285: uint32_t Gs; // ffbch : NO
please, no spaces at the start of a line
Patch Set #1, Line 286: uint32_t Ldtr; // ffc0h : NO
trailing whitespace
Patch Set #1, Line 286: uint32_t Ldtr; // ffc0h : NO
please, no spaces at the start of a line
Patch Set #1, Line 287: uint32_t Tr; // ffc4h : NO
trailing whitespace
Patch Set #1, Line 287: uint32_t Tr; // ffc4h : NO
please, no spaces at the start of a line
Patch Set #1, Line 288: uint64_t Dr7; // ffc8h : NO
trailing whitespace
Patch Set #1, Line 288: uint64_t Dr7; // ffc8h : NO
please, no spaces at the start of a line
Patch Set #1, Line 289: uint64_t Dr6; // ffd0h : NO
trailing whitespace
Patch Set #1, Line 289: uint64_t Dr6; // ffd0h : NO
please, no spaces at the start of a line
Patch Set #1, Line 290: uint64_t Rip; // ffd8h : YES
trailing whitespace
Patch Set #1, Line 290: uint64_t Rip; // ffd8h : YES
please, no spaces at the start of a line
Patch Set #1, Line 291: uint64_t Ia32Efer; // ffe0h : YES - NO for STM
trailing whitespace
Patch Set #1, Line 291: uint64_t Ia32Efer; // ffe0h : YES - NO for STM
line over 80 characters
Patch Set #1, Line 291: uint64_t Ia32Efer; // ffe0h : YES - NO for STM
please, no spaces at the start of a line
Patch Set #1, Line 292: uint64_t Rflags; // ffe8h : YES
trailing whitespace
Patch Set #1, Line 292: uint64_t Rflags; // ffe8h : YES
please, no spaces at the start of a line
Patch Set #1, Line 293: uint64_t Cr3; // fff0h : NO
trailing whitespace
Patch Set #1, Line 293: uint64_t Cr3; // fff0h : NO
please, no spaces at the start of a line
Patch Set #1, Line 294: uint64_t Cr0; // fff8h : NO
trailing whitespace
Patch Set #1, Line 294: uint64_t Cr0; // fff8h : NO
please, no spaces at the start of a line
Patch Set #1, Line 295: } STM_SMM_CPU_STATE;
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 298: // STM Mapping
trailing whitespace
trailing whitespace
DOS line endings
Patch Set #1, Line 301: typedef struct {
DOS line endings
Patch Set #1, Line 302: uint64_t PhysicalAddress;
DOS line endings
Patch Set #1, Line 302: uint64_t PhysicalAddress;
please, no spaces at the start of a line
Patch Set #1, Line 303: uint64_t VirtualAddress;
DOS line endings
Patch Set #1, Line 303: uint64_t VirtualAddress;
please, no spaces at the start of a line
Patch Set #1, Line 304: uint32_t PageCount;
DOS line endings
Patch Set #1, Line 304: uint32_t PageCount;
please, no spaces at the start of a line
Patch Set #1, Line 305: uint32_t PatCacheType;
DOS line endings
Patch Set #1, Line 305: uint32_t PatCacheType;
please, no spaces at the start of a line
Patch Set #1, Line 306: } STM_MAP_ADDRESS_RANGE_DESCRIPTOR;
DOS line endings
Patch Set #1, Line 307: #define ST_UC 0x00
DOS line endings
Patch Set #1, Line 308: #define WC 0x01
DOS line endings
Patch Set #1, Line 309: #define WT 0x04
DOS line endings
Patch Set #1, Line 310: #define WP 0x05
DOS line endings
Patch Set #1, Line 311: #define WB 0x06
DOS line endings
Patch Set #1, Line 312: #define UC 0x07
DOS line endings
Patch Set #1, Line 313: #define FOLLOW_MTRR 0xFFFFFFFF
DOS line endings
DOS line endings
Patch Set #1, Line 315: typedef struct {
DOS line endings
Patch Set #1, Line 316: uint64_t VirtualAddress;
DOS line endings
Patch Set #1, Line 316: uint64_t VirtualAddress;
please, no spaces at the start of a line
Patch Set #1, Line 317: uint32_t Length;
DOS line endings
Patch Set #1, Line 317: uint32_t Length;
please, no spaces at the start of a line
Patch Set #1, Line 318: } STM_UNMAP_ADDRESS_RANGE_DESCRIPTOR;
DOS line endings
DOS line endings
Patch Set #1, Line 320: typedef struct {
DOS line endings
Patch Set #1, Line 321: uint64_t InterruptedGuestVirtualAddress;
DOS line endings
Patch Set #1, Line 321: uint64_t InterruptedGuestVirtualAddress;
please, no spaces at the start of a line
Patch Set #1, Line 322: uint32_t Length;
DOS line endings
Patch Set #1, Line 322: uint32_t Length;
please, no spaces at the start of a line
Patch Set #1, Line 323: uint64_t InterruptedCr3;
DOS line endings
Patch Set #1, Line 323: uint64_t InterruptedCr3;
please, no spaces at the start of a line
Patch Set #1, Line 324: uint64_t InterruptedEptp;
DOS line endings
Patch Set #1, Line 324: uint64_t InterruptedEptp;
please, no spaces at the start of a line
Patch Set #1, Line 325: uint32_t MapToSmmGuest:2;
DOS line endings
Patch Set #1, Line 325: uint32_t MapToSmmGuest:2;
please, no spaces at the start of a line
Patch Set #1, Line 326: uint32_t InterruptedCr4Pae:1;
DOS line endings
Patch Set #1, Line 326: uint32_t InterruptedCr4Pae:1;
please, no spaces at the start of a line
Patch Set #1, Line 327: uint32_t InterruptedCr4Pse:1;
DOS line endings
Patch Set #1, Line 327: uint32_t InterruptedCr4Pse:1;
please, no spaces at the start of a line
Patch Set #1, Line 328: uint32_t InterruptedIa32eMode:1;
DOS line endings
Patch Set #1, Line 328: uint32_t InterruptedIa32eMode:1;
please, no spaces at the start of a line
Patch Set #1, Line 329: uint32_t Reserved1:27;
DOS line endings
Patch Set #1, Line 329: uint32_t Reserved1:27;
please, no spaces at the start of a line
Patch Set #1, Line 330: uint32_t Reserved2;
DOS line endings
Patch Set #1, Line 330: uint32_t Reserved2;
please, no spaces at the start of a line
Patch Set #1, Line 331: uint64_t PhysicalAddress;
DOS line endings
Patch Set #1, Line 331: uint64_t PhysicalAddress;
please, no spaces at the start of a line
Patch Set #1, Line 332: uint64_t SmmGuestVirtualAddress;
DOS line endings
Patch Set #1, Line 332: uint64_t SmmGuestVirtualAddress;
please, no spaces at the start of a line
Patch Set #1, Line 333: } STM_ADDRESS_LOOKUP_DESCRIPTOR;
DOS line endings
Patch Set #1, Line 334: #define DO_NOT_MAP 0
DOS line endings
Patch Set #1, Line 335: #define ONE_TO_ONE 1
DOS line endings
Patch Set #1, Line 336: #define VIRTUAL_ADDRESS_SPECIFIED 3
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 339: // STM_RESOURCE_LIST
trailing whitespace
trailing whitespace
Patch Set #1, Line 341: #define END_OF_RESOURCES 0
DOS line endings
Patch Set #1, Line 342: #define MEM_RANGE 1
DOS line endings
Patch Set #1, Line 343: #define IO_RANGE 2
DOS line endings
Patch Set #1, Line 344: #define MMIO_RANGE 3
DOS line endings
Patch Set #1, Line 345: #define MACHINE_SPECIFIC_REG 4
DOS line endings
Patch Set #1, Line 346: #define PCI_CFG_RANGE 5
DOS line endings
Patch Set #1, Line 347: #define TRAPPED_IO_RANGE 6
DOS line endings
Patch Set #1, Line 348: #define ALL_RESOURCES 7
DOS line endings
Patch Set #1, Line 349: #define REGISTER_VIOLATION 8
DOS line endings
Patch Set #1, Line 350: #define MAX_DESC_TYPE 8
DOS line endings
DOS line endings
Patch Set #1, Line 352: typedef struct {
DOS line endings
Patch Set #1, Line 353: uint32_t RscType;
DOS line endings
Patch Set #1, Line 353: uint32_t RscType;
please, no spaces at the start of a line
Patch Set #1, Line 354: uint16_t Length;
DOS line endings
Patch Set #1, Line 354: uint16_t Length;
please, no spaces at the start of a line
Patch Set #1, Line 355: uint16_t ReturnStatus:1;
DOS line endings
Patch Set #1, Line 355: uint16_t ReturnStatus:1;
please, no spaces at the start of a line
Patch Set #1, Line 356: uint16_t Reserved:14;
DOS line endings
Patch Set #1, Line 356: uint16_t Reserved:14;
please, no spaces at the start of a line
Patch Set #1, Line 357: uint16_t IgnoreResource:1;
DOS line endings
Patch Set #1, Line 357: uint16_t IgnoreResource:1;
please, no spaces at the start of a line
Patch Set #1, Line 358: } STM_RSC_DESC_HEADER;
DOS line endings
DOS line endings
Patch Set #1, Line 360: typedef struct {
DOS line endings
Patch Set #1, Line 361: STM_RSC_DESC_HEADER Hdr;
DOS line endings
Patch Set #1, Line 361: STM_RSC_DESC_HEADER Hdr;
please, no spaces at the start of a line
Patch Set #1, Line 362: uint64_t ResourceListContinuation;
DOS line endings
Patch Set #1, Line 362: uint64_t ResourceListContinuation;
please, no spaces at the start of a line
Patch Set #1, Line 363: } STM_RSC_END;
DOS line endings
DOS line endings
Patch Set #1, Line 365: // byte granular Memory range support
trailing whitespace
Patch Set #1, Line 366: #define STM_RSC_BGM 0x4
DOS line endings
DOS line endings
Patch Set #1, Line 368: typedef struct {
DOS line endings
Patch Set #1, Line 369: STM_RSC_DESC_HEADER Hdr;
DOS line endings
Patch Set #1, Line 369: STM_RSC_DESC_HEADER Hdr;
please, no spaces at the start of a line
Patch Set #1, Line 370: uint64_t Base;
DOS line endings
Patch Set #1, Line 370: uint64_t Base;
please, no spaces at the start of a line
Patch Set #1, Line 371: uint64_t Length;
DOS line endings
Patch Set #1, Line 371: uint64_t Length;
please, no spaces at the start of a line
Patch Set #1, Line 372: uint32_t RWXAttributes:3;
DOS line endings
Patch Set #1, Line 372: uint32_t RWXAttributes:3;
please, no spaces at the start of a line
Patch Set #1, Line 373: uint32_t Reserved:29;
DOS line endings
Patch Set #1, Line 373: uint32_t Reserved:29;
please, no spaces at the start of a line
Patch Set #1, Line 374: uint32_t Reserved_2;
DOS line endings
Patch Set #1, Line 374: uint32_t Reserved_2;
please, no spaces at the start of a line
Patch Set #1, Line 375: } STM_RSC_MEM_DESC;
DOS line endings
Patch Set #1, Line 376: #define STM_RSC_MEM_R 0x1
DOS line endings
Patch Set #1, Line 377: #define STM_RSC_MEM_W 0x2
DOS line endings
Patch Set #1, Line 378: #define STM_RSC_MEM_X 0x4
DOS line endings
DOS line endings
Patch Set #1, Line 380: typedef struct {
DOS line endings
Patch Set #1, Line 381: STM_RSC_DESC_HEADER Hdr;
DOS line endings
Patch Set #1, Line 381: STM_RSC_DESC_HEADER Hdr;
please, no spaces at the start of a line
Patch Set #1, Line 382: uint16_t Base;
DOS line endings
Patch Set #1, Line 382: uint16_t Base;
please, no spaces at the start of a line
Patch Set #1, Line 383: uint16_t Length;
DOS line endings
Patch Set #1, Line 383: uint16_t Length;
please, no spaces at the start of a line
Patch Set #1, Line 384: uint32_t Reserved;
DOS line endings
Patch Set #1, Line 384: uint32_t Reserved;
please, no spaces at the start of a line
Patch Set #1, Line 385: } STM_RSC_IO_DESC;
DOS line endings
DOS line endings
Patch Set #1, Line 387: // byte granular MMIO range support
trailing whitespace
Patch Set #1, Line 388: #define STM_RSC_BGI 0x2
DOS line endings
DOS line endings
Patch Set #1, Line 390: typedef struct {
DOS line endings
Patch Set #1, Line 391: STM_RSC_DESC_HEADER Hdr;
DOS line endings
Patch Set #1, Line 391: STM_RSC_DESC_HEADER Hdr;
please, no spaces at the start of a line
Patch Set #1, Line 392: uint64_t Base;
DOS line endings
Patch Set #1, Line 392: uint64_t Base;
please, no spaces at the start of a line
Patch Set #1, Line 393: uint64_t Length;
DOS line endings
Patch Set #1, Line 393: uint64_t Length;
please, no spaces at the start of a line
Patch Set #1, Line 394: uint32_t RWXAttributes:3;
DOS line endings
Patch Set #1, Line 394: uint32_t RWXAttributes:3;
please, no spaces at the start of a line
Patch Set #1, Line 395: uint32_t Reserved:29;
DOS line endings
Patch Set #1, Line 395: uint32_t Reserved:29;
please, no spaces at the start of a line
Patch Set #1, Line 396: uint32_t Reserved_2;
DOS line endings
Patch Set #1, Line 396: uint32_t Reserved_2;
please, no spaces at the start of a line
Patch Set #1, Line 397: } STM_RSC_MMIO_DESC;
DOS line endings
Patch Set #1, Line 398: #define STM_RSC_MMIO_R 0x1
DOS line endings
Patch Set #1, Line 399: #define STM_RSC_MMIO_W 0x2
DOS line endings
Patch Set #1, Line 400: #define STM_RSC_MMIO_X 0x4
DOS line endings
DOS line endings
Patch Set #1, Line 402: typedef struct {
DOS line endings
Patch Set #1, Line 403: STM_RSC_DESC_HEADER Hdr;
DOS line endings
Patch Set #1, Line 403: STM_RSC_DESC_HEADER Hdr;
please, no spaces at the start of a line
Patch Set #1, Line 404: uint32_t MsrIndex;
DOS line endings
Patch Set #1, Line 404: uint32_t MsrIndex;
please, no spaces at the start of a line
Patch Set #1, Line 405: uint32_t KernelModeProcessing:1;
DOS line endings
Patch Set #1, Line 405: uint32_t KernelModeProcessing:1;
please, no spaces at the start of a line
Patch Set #1, Line 406: uint32_t Reserved:31;
DOS line endings
Patch Set #1, Line 406: uint32_t Reserved:31;
please, no spaces at the start of a line
Patch Set #1, Line 407: uint64_t ReadMask;
DOS line endings
Patch Set #1, Line 407: uint64_t ReadMask;
please, no spaces at the start of a line
Patch Set #1, Line 408: uint64_t WriteMask;
DOS line endings
Patch Set #1, Line 408: uint64_t WriteMask;
please, no spaces at the start of a line
Patch Set #1, Line 409: } STM_RSC_MSR_DESC;
DOS line endings
DOS line endings
Patch Set #1, Line 411: // bit granular MSR resource support
trailing whitespace
Patch Set #1, Line 412: #define STM_RSC_MSR 0x8
DOS line endings
DOS line endings
Patch Set #1, Line 414: typedef struct {
DOS line endings
Patch Set #1, Line 415: uint8_t Type; // must be 1, indicating Hardware Device Path
trailing whitespace
Patch Set #1, Line 415: uint8_t Type; // must be 1, indicating Hardware Device Path
please, no spaces at the start of a line
Patch Set #1, Line 416: uint8_t Subtype; // must be 1, indicating PCI
trailing whitespace
Patch Set #1, Line 416: uint8_t Subtype; // must be 1, indicating PCI
please, no spaces at the start of a line
Patch Set #1, Line 417: uint16_t Length; // sizeof(STM_PCI_DEVICE_PATH_NODE) which is 6
trailing whitespace
Patch Set #1, Line 417: uint16_t Length; // sizeof(STM_PCI_DEVICE_PATH_NODE) which is 6
please, no spaces at the start of a line
Patch Set #1, Line 418: uint8_t PciFunction;
DOS line endings
Patch Set #1, Line 418: uint8_t PciFunction;
please, no spaces at the start of a line
Patch Set #1, Line 419: uint8_t PciDevice;
DOS line endings
Patch Set #1, Line 419: uint8_t PciDevice;
please, no spaces at the start of a line
Patch Set #1, Line 420: } STM_PCI_DEVICE_PATH_NODE;
DOS line endings
Patch Set #1, Line 421: typedef struct {
DOS line endings
Patch Set #1, Line 422: STM_RSC_DESC_HEADER Hdr;
DOS line endings
Patch Set #1, Line 422: STM_RSC_DESC_HEADER Hdr;
please, no spaces at the start of a line
Patch Set #1, Line 423: uint16_t RWAttributes:2;
DOS line endings
Patch Set #1, Line 423: uint16_t RWAttributes:2;
please, no spaces at the start of a line
Patch Set #1, Line 424: uint16_t Reserved:14;
DOS line endings
Patch Set #1, Line 424: uint16_t Reserved:14;
please, no spaces at the start of a line
Patch Set #1, Line 425: uint16_t Base;
DOS line endings
Patch Set #1, Line 425: uint16_t Base;
please, no spaces at the start of a line
Patch Set #1, Line 426: uint16_t Length;
DOS line endings
Patch Set #1, Line 426: uint16_t Length;
please, no spaces at the start of a line
Patch Set #1, Line 427: uint8_t OriginatingBusNumber;
DOS line endings
Patch Set #1, Line 427: uint8_t OriginatingBusNumber;
please, no spaces at the start of a line
Patch Set #1, Line 428: uint8_t LastNodeIndex;
DOS line endings
Patch Set #1, Line 428: uint8_t LastNodeIndex;
please, no spaces at the start of a line
Patch Set #1, Line 429: STM_PCI_DEVICE_PATH_NODE PciDevicePath[1];
DOS line endings
Patch Set #1, Line 429: STM_PCI_DEVICE_PATH_NODE PciDevicePath[1];
please, no spaces at the start of a line
Patch Set #1, Line 430: //STM_PCI_DEVICE_PATH_NODE PciDevicePath[LastNodeIndex + 1];
trailing whitespace
Patch Set #1, Line 431: } STM_RSC_PCI_CFG_DESC;
DOS line endings
DOS line endings
Patch Set #1, Line 433: #define STM_RSC_PCI_CFG_R 0x1
DOS line endings
Patch Set #1, Line 434: #define STM_RSC_PCI_CFG_W 0x2
DOS line endings
DOS line endings
Patch Set #1, Line 436: typedef struct {
DOS line endings
Patch Set #1, Line 437: STM_RSC_DESC_HEADER Hdr;
DOS line endings
Patch Set #1, Line 437: STM_RSC_DESC_HEADER Hdr;
please, no spaces at the start of a line
Patch Set #1, Line 438: uint16_t Base;
DOS line endings
Patch Set #1, Line 438: uint16_t Base;
please, no spaces at the start of a line
Patch Set #1, Line 439: uint16_t Length;
DOS line endings
Patch Set #1, Line 439: uint16_t Length;
please, no spaces at the start of a line
Patch Set #1, Line 440: uint16_t In:1;
DOS line endings
Patch Set #1, Line 440: uint16_t In:1;
please, no spaces at the start of a line
Patch Set #1, Line 441: uint16_t Out:1;
DOS line endings
Patch Set #1, Line 441: uint16_t Out:1;
please, no spaces at the start of a line
Patch Set #1, Line 442: uint16_t Api:1;
DOS line endings
Patch Set #1, Line 442: uint16_t Api:1;
please, no spaces at the start of a line
Patch Set #1, Line 443: uint16_t Reserved1:13;
DOS line endings
Patch Set #1, Line 443: uint16_t Reserved1:13;
please, no spaces at the start of a line
Patch Set #1, Line 444: uint16_t Reserved2;
DOS line endings
Patch Set #1, Line 444: uint16_t Reserved2;
please, no spaces at the start of a line
Patch Set #1, Line 445: } STM_RSC_TRAPPED_IO_DESC;
DOS line endings
DOS line endings
Patch Set #1, Line 447: typedef struct {
DOS line endings
Patch Set #1, Line 448: STM_RSC_DESC_HEADER Hdr;
DOS line endings
Patch Set #1, Line 448: STM_RSC_DESC_HEADER Hdr;
please, no spaces at the start of a line
Patch Set #1, Line 449: } STM_RSC_ALL_RESOURCES_DESC;
DOS line endings
DOS line endings
Patch Set #1, Line 451: typedef struct {
DOS line endings
Patch Set #1, Line 452: STM_RSC_DESC_HEADER Hdr;
DOS line endings
Patch Set #1, Line 452: STM_RSC_DESC_HEADER Hdr;
please, no spaces at the start of a line
Patch Set #1, Line 453: uint32_t RegisterType;
DOS line endings
Patch Set #1, Line 453: uint32_t RegisterType;
please, no spaces at the start of a line
Patch Set #1, Line 454: uint32_t Reserved;
DOS line endings
Patch Set #1, Line 454: uint32_t Reserved;
please, no spaces at the start of a line
Patch Set #1, Line 455: uint64_t ReadMask;
DOS line endings
Patch Set #1, Line 455: uint64_t ReadMask;
please, no spaces at the start of a line
Patch Set #1, Line 456: uint64_t WriteMask;
DOS line endings
Patch Set #1, Line 456: uint64_t WriteMask;
please, no spaces at the start of a line
Patch Set #1, Line 457: } STM_REGISTER_VIOLATION_DESC;
DOS line endings
DOS line endings
Patch Set #1, Line 459: typedef enum {
DOS line endings
Patch Set #1, Line 460: StmRegisterCr0,
DOS line endings
Patch Set #1, Line 460: StmRegisterCr0,
please, no spaces at the start of a line
Patch Set #1, Line 461: StmRegisterCr2,
DOS line endings
Patch Set #1, Line 461: StmRegisterCr2,
please, no spaces at the start of a line
Patch Set #1, Line 462: StmRegisterCr3,
DOS line endings
Patch Set #1, Line 462: StmRegisterCr3,
please, no spaces at the start of a line
Patch Set #1, Line 463: StmRegisterCr4,
DOS line endings
Patch Set #1, Line 463: StmRegisterCr4,
please, no spaces at the start of a line
Patch Set #1, Line 464: StmRegisterCr8,
DOS line endings
Patch Set #1, Line 464: StmRegisterCr8,
please, no spaces at the start of a line
Patch Set #1, Line 465: StmRegisterMax,
DOS line endings
Patch Set #1, Line 465: StmRegisterMax,
please, no spaces at the start of a line
Patch Set #1, Line 466: } STM_REGISTER_VIOLATION_TYPE;
DOS line endings
DOS line endings
Patch Set #1, Line 468: typedef union {
DOS line endings
Patch Set #1, Line 469: STM_RSC_DESC_HEADER Header;
DOS line endings
Patch Set #1, Line 469: STM_RSC_DESC_HEADER Header;
please, no spaces at the start of a line
Patch Set #1, Line 470: STM_RSC_END End;
DOS line endings
Patch Set #1, Line 470: STM_RSC_END End;
please, no spaces at the start of a line
Patch Set #1, Line 471: STM_RSC_MEM_DESC Mem;
DOS line endings
Patch Set #1, Line 471: STM_RSC_MEM_DESC Mem;
please, no spaces at the start of a line
Patch Set #1, Line 472: STM_RSC_IO_DESC Io;
DOS line endings
Patch Set #1, Line 472: STM_RSC_IO_DESC Io;
please, no spaces at the start of a line
Patch Set #1, Line 473: STM_RSC_MMIO_DESC Mmio;
DOS line endings
Patch Set #1, Line 473: STM_RSC_MMIO_DESC Mmio;
please, no spaces at the start of a line
Patch Set #1, Line 474: STM_RSC_MSR_DESC Msr;
DOS line endings
Patch Set #1, Line 474: STM_RSC_MSR_DESC Msr;
please, no spaces at the start of a line
Patch Set #1, Line 475: STM_RSC_PCI_CFG_DESC PciCfg;
DOS line endings
Patch Set #1, Line 475: STM_RSC_PCI_CFG_DESC PciCfg;
please, no spaces at the start of a line
Patch Set #1, Line 476: STM_RSC_TRAPPED_IO_DESC TrappedIo;
DOS line endings
Patch Set #1, Line 476: STM_RSC_TRAPPED_IO_DESC TrappedIo;
please, no spaces at the start of a line
Patch Set #1, Line 477: STM_RSC_ALL_RESOURCES_DESC All;
DOS line endings
Patch Set #1, Line 477: STM_RSC_ALL_RESOURCES_DESC All;
please, no spaces at the start of a line
Patch Set #1, Line 478: STM_REGISTER_VIOLATION_DESC RegisterViolation;
DOS line endings
Patch Set #1, Line 478: STM_REGISTER_VIOLATION_DESC RegisterViolation;
please, no spaces at the start of a line
Patch Set #1, Line 479: } STM_RSC;
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 482: // VMCS database
trailing whitespace
trailing whitespace
Patch Set #1, Line 484: #define STM_VMCS_DATABASE_REQUEST_ADD 1
DOS line endings
Patch Set #1, Line 485: #define STM_VMCS_DATABASE_REQUEST_REMOVE 0
DOS line endings
DOS line endings
Patch Set #1, Line 487: // Values for DomainType
trailing whitespace
Patch Set #1, Line 488: // Intepreter of DomainType
trailing whitespace
Patch Set #1, Line 489: #define DOMAIN_DISALLOWED_IO_OUT (1u << 0)
DOS line endings
Patch Set #1, Line 490: #define DOMAIN_DISALLOWED_IO_IN (1u << 1)
DOS line endings
Patch Set #1, Line 491: #define DOMAIN_INTEGRITY (1u << 2)
DOS line endings
Patch Set #1, Line 492: #define DOMAIN_CONFIDENTIALITY (1u << 3)
DOS line endings
DOS line endings
Patch Set #1, Line 494: #define DOMAIN_UNPROTECTED 0x00
DOS line endings
Patch Set #1, Line 495: #define DOMAIN_INTEGRITY_PROT_OUT_IN (DOMAIN_INTEGRITY)
DOS line endings
Patch Set #1, Line 496: //#define DOMAIN_INTEGRITY_PROT_OUT (DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN)
trailing whitespace
Patch Set #1, Line 496: //#define DOMAIN_INTEGRITY_PROT_OUT (DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN)
line over 80 characters
Patch Set #1, Line 497: #define DOMAIN_FULLY_PROT_OUT_IN (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY)
DOS line endings
Patch Set #1, Line 497: #define DOMAIN_FULLY_PROT_OUT_IN (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY)
line over 80 characters
Patch Set #1, Line 498: //#define DOMAIN_FULLY_PROT_IN (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_OUT)
trailing whitespace
Patch Set #1, Line 498: //#define DOMAIN_FULLY_PROT_IN (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_OUT)
line over 80 characters
Patch Set #1, Line 499: //#define DOMAIN_FULLY_PROT_OUT (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN)
trailing whitespace
Patch Set #1, Line 499: //#define DOMAIN_FULLY_PROT_OUT (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN)
line over 80 characters
Patch Set #1, Line 500: #define DOMAIN_FULLY_PROT (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN | DOMAIN_DISALLOWED_IO_OUT)
DOS line endings
Patch Set #1, Line 500: #define DOMAIN_FULLY_PROT (DOMAIN_CONFIDENTIALITY | DOMAIN_INTEGRITY | DOMAIN_DISALLOWED_IO_IN | DOMAIN_DISALLOWED_IO_OUT)
line over 80 characters
DOS line endings
Patch Set #1, Line 502: // Values for XStatePolicy
trailing whitespace
Patch Set #1, Line 503: #define XSTATE_READWRITE 0x00
DOS line endings
Patch Set #1, Line 504: #define XSTATE_READONLY 0x01
DOS line endings
Patch Set #1, Line 505: #define XSTATE_SCRUB 0x03
DOS line endings
DOS line endings
Patch Set #1, Line 507: typedef struct {
DOS line endings
Patch Set #1, Line 508: uint64_t VmcsPhysPointer; // bits 11:0 are reserved and must be 0
trailing whitespace
Patch Set #1, Line 508: uint64_t VmcsPhysPointer; // bits 11:0 are reserved and must be 0
please, no spaces at the start of a line
Patch Set #1, Line 509: uint32_t DomainType :4;
DOS line endings
Patch Set #1, Line 509: uint32_t DomainType :4;
please, no spaces at the start of a line
Patch Set #1, Line 510: uint32_t XStatePolicy :2;
DOS line endings
Patch Set #1, Line 510: uint32_t XStatePolicy :2;
please, no spaces at the start of a line
Patch Set #1, Line 511: uint32_t DegradationPolicy :4;
DOS line endings
Patch Set #1, Line 511: uint32_t DegradationPolicy :4;
please, no spaces at the start of a line
Patch Set #1, Line 512: uint32_t Reserved1 :22; // Must be 0
trailing whitespace
Patch Set #1, Line 512: uint32_t Reserved1 :22; // Must be 0
please, no spaces at the start of a line
Patch Set #1, Line 513: uint32_t AddOrRemove;
DOS line endings
Patch Set #1, Line 513: uint32_t AddOrRemove;
please, no spaces at the start of a line
Patch Set #1, Line 514: } STM_VMCS_DATABASE_REQUEST;
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 517: // Event log
trailing whitespace
trailing whitespace
Patch Set #1, Line 519: #define NEW_LOG 1
DOS line endings
Patch Set #1, Line 520: #define CONFIGURE_LOG 2
DOS line endings
Patch Set #1, Line 521: #define START_LOG 3
DOS line endings
Patch Set #1, Line 522: #define STOP_LOG 4
DOS line endings
Patch Set #1, Line 523: #define CLEAR_LOG 5
DOS line endings
Patch Set #1, Line 524: #define DELETE_LOG 6
DOS line endings
Patch Set #1, Line 525: typedef enum {
DOS line endings
Patch Set #1, Line 526: EvtLogStarted,
DOS line endings
Patch Set #1, Line 526: EvtLogStarted,
please, no spaces at the start of a line
Patch Set #1, Line 527: EvtLogStopped,
DOS line endings
Patch Set #1, Line 527: EvtLogStopped,
please, no spaces at the start of a line
Patch Set #1, Line 528: EvtLogInvalidParameterDetected,
DOS line endings
Patch Set #1, Line 528: EvtLogInvalidParameterDetected,
please, no spaces at the start of a line
Patch Set #1, Line 529: EvtHandledProtectionException,
DOS line endings
Patch Set #1, Line 529: EvtHandledProtectionException,
please, no spaces at the start of a line
Patch Set #1, Line 530: // unhandled protection exceptions result in reset & cannot be logged
trailing whitespace
Patch Set #1, Line 531: EvtBiosAccessToUnclaimedResource,
DOS line endings
Patch Set #1, Line 531: EvtBiosAccessToUnclaimedResource,
please, no spaces at the start of a line
Patch Set #1, Line 532: EvtMleResourceProtectionGranted,
DOS line endings
Patch Set #1, Line 532: EvtMleResourceProtectionGranted,
please, no spaces at the start of a line
Patch Set #1, Line 533: EvtMleResourceProtectionDenied,
DOS line endings
Patch Set #1, Line 533: EvtMleResourceProtectionDenied,
please, no spaces at the start of a line
Patch Set #1, Line 534: EvtMleResourceUnprotect,
DOS line endings
Patch Set #1, Line 534: EvtMleResourceUnprotect,
please, no spaces at the start of a line
Patch Set #1, Line 535: EvtMleResourceUnprotectError,
DOS line endings
Patch Set #1, Line 535: EvtMleResourceUnprotectError,
please, no spaces at the start of a line
Patch Set #1, Line 536: EvtMleDomainTypeDegraded,
DOS line endings
Patch Set #1, Line 536: EvtMleDomainTypeDegraded,
please, no spaces at the start of a line
Patch Set #1, Line 537: // add more here
trailing whitespace
Patch Set #1, Line 538: EvtMleMax,
DOS line endings
Patch Set #1, Line 538: EvtMleMax,
please, no spaces at the start of a line
Patch Set #1, Line 539: // Not used
trailing whitespace
Patch Set #1, Line 540: EvtInvalid = 0xFFFFFFFF,
DOS line endings
Patch Set #1, Line 540: EvtInvalid = 0xFFFFFFFF,
please, no spaces at the start of a line
Patch Set #1, Line 541: } EVENT_TYPE;
DOS line endings
DOS line endings
Patch Set #1, Line 543: //#define STM_EVENT_LOG_PAGE_COUNT_MAX 62
trailing whitespace
DOS line endings
Patch Set #1, Line 545: typedef struct {
DOS line endings
Patch Set #1, Line 546: uint32_t PageCount;
DOS line endings
Patch Set #1, Line 546: uint32_t PageCount;
please, no spaces at the start of a line
Patch Set #1, Line 547: uint64_t Pages[1]; // number of elements is PageCount
trailing whitespace
Patch Set #1, Line 547: uint64_t Pages[1]; // number of elements is PageCount
please, no spaces at the start of a line
Patch Set #1, Line 548: } STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA_LOG_BUFFER;
DOS line endings
DOS line endings
Patch Set #1, Line 550: typedef union {
DOS line endings
Patch Set #1, Line 551: STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA_LOG_BUFFER LogBuffer;
DOS line endings
Patch Set #1, Line 551: STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA_LOG_BUFFER LogBuffer;
please, no spaces at the start of a line
Patch Set #1, Line 552: uint32_t EventEnableBitmap; // bitmap of EVENT_TYPE
trailing whitespace
Patch Set #1, Line 552: uint32_t EventEnableBitmap; // bitmap of EVENT_TYPE
line over 80 characters
Patch Set #1, Line 552: uint32_t EventEnableBitmap; // bitmap of EVENT_TYPE
please, no spaces at the start of a line
Patch Set #1, Line 553: } STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA;
DOS line endings
DOS line endings
Patch Set #1, Line 555: typedef struct {
DOS line endings
Patch Set #1, Line 556: uint32_t SubFunctionIndex;
DOS line endings
Patch Set #1, Line 556: uint32_t SubFunctionIndex;
please, no spaces at the start of a line
Patch Set #1, Line 557: STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA Data;
DOS line endings
Patch Set #1, Line 557: STM_EVENT_LOG_MANAGEMENT_REQUEST_DATA Data;
please, no spaces at the start of a line
Patch Set #1, Line 558: } STM_EVENT_LOG_MANAGEMENT_REQUEST;
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 561: // VMCALL API Numbers
trailing whitespace
trailing whitespace
DOS line endings
Patch Set #1, Line 564: // API number convention: BIOS facing VMCALL interfaces have bit 16 clear
trailing whitespace
Patch Set #1, Line 565: #define STM_API_MAP_ADDRESS_RANGE 0x00000001
DOS line endings
Patch Set #1, Line 566: #define STM_API_UNMAP_ADDRESS_RANGE 0x00000002
DOS line endings
Patch Set #1, Line 567: #define STM_API_ADDRESS_LOOKUP 0x00000003
DOS line endings
Patch Set #1, Line 568: #define STM_API_RETURN_FROM_PROTECTION_EXCEPTION 0x00000004
DOS line endings
DOS line endings
Patch Set #1, Line 570: // API number convention: MLE facing VMCALL interfaces have bit 16 set
trailing whitespace
trailing whitespace
Patch Set #1, Line 572: // The STM configuration lifecycle is as follows:
trailing whitespace
Patch Set #1, Line 573: // 1. SENTER->SINIT->MLE: MLE begins execution with SMI disabled (masked).
trailing whitespace
Patch Set #1, Line 574: // 2. MLE invokes InitializeProtectionVMCALL() to prepare STM for setup of initial protection profile. This is done on a single CPU and has global effect.
trailing whitespace
Patch Set #1, Line 574: // 2. MLE invokes InitializeProtectionVMCALL() to prepare STM for setup of initial protection profile. This is done on a single CPU and has global effect.
line over 80 characters
Patch Set #1, Line 575: // 3. MLE invokes ProtectResourceVMCALL() to define the initial protection profile. The protection profile is global across all CPUs.
trailing whitespace
Patch Set #1, Line 575: // 3. MLE invokes ProtectResourceVMCALL() to define the initial protection profile. The protection profile is global across all CPUs.
line over 80 characters
Patch Set #1, Line 576: // 4. MLE invokes StartStmVMCALL() to enable the STM to begin receiving SMI events. This must be done on every logical CPU.
trailing whitespace
Patch Set #1, Line 576: // 4. MLE invokes StartStmVMCALL() to enable the STM to begin receiving SMI events. This must be done on every logical CPU.
line over 80 characters
Patch Set #1, Line 577: // 5. MLE may invoke ProtectResourceVMCALL() or UnProtectResourceVMCALL() during runtime as many times as necessary.
trailing whitespace
Patch Set #1, Line 577: // 5. MLE may invoke ProtectResourceVMCALL() or UnProtectResourceVMCALL() during runtime as many times as necessary.
line over 80 characters
Patch Set #1, Line 578: // 6. MLE invokes StopStmVMCALL() to disable the STM. SMI is again masked following StopStmVMCALL().
trailing whitespace
Patch Set #1, Line 578: // 6. MLE invokes StopStmVMCALL() to disable the STM. SMI is again masked following StopStmVMCALL().
line over 80 characters
trailing whitespace
Patch Set #1, Line 580: #define STM_API_START 0x00010001
DOS line endings
Patch Set #1, Line 581: #define STM_API_STOP 0x00010002
DOS line endings
Patch Set #1, Line 582: #define STM_API_PROTECT_RESOURCE 0x00010003
DOS line endings
Patch Set #1, Line 583: #define STM_API_UNPROTECT_RESOURCE 0x00010004
DOS line endings
Patch Set #1, Line 584: #define STM_API_GET_BIOS_RESOURCES 0x00010005
DOS line endings
Patch Set #1, Line 585: #define STM_API_MANAGE_VMCS_DATABASE 0x00010006
DOS line endings
Patch Set #1, Line 586: #define STM_API_INITIALIZE_PROTECTION 0x00010007
DOS line endings
Patch Set #1, Line 587: #define STM_API_MANAGE_EVENT_LOG 0x00010008
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 590: // Return codes
trailing whitespace
trailing whitespace
Patch Set #1, Line 592: typedef uint32_t STM_STATUS;
DOS line endings
DOS line endings
Patch Set #1, Line 594: #define STM_SUCCESS 0x00000000
DOS line endings
Patch Set #1, Line 595: #define SMM_SUCCESS 0x00000000
DOS line endings
Patch Set #1, Line 596: // all error codes have bit 31 set
trailing whitespace
Patch Set #1, Line 597: // STM errors have bit 16 set
trailing whitespace
Patch Set #1, Line 598: #define ERROR_STM_SECURITY_VIOLATION 0x80010001
DOS line endings
Patch Set #1, Line 599: #define ERROR_STM_CACHE_TYPE_NOT_SUPPORTED 0x80010002
DOS line endings
Patch Set #1, Line 600: #define ERROR_STM_PAGE_NOT_FOUND 0x80010003
DOS line endings
Patch Set #1, Line 601: #define ERROR_STM_BAD_CR3 0x80010004
DOS line endings
Patch Set #1, Line 602: #define ERROR_STM_PHYSICAL_OVER_4G 0x80010005
DOS line endings
Patch Set #1, Line 603: #define ERROR_STM_VIRTUAL_SPACE_TOO_SMALL 0x80010006
DOS line endings
Patch Set #1, Line 604: #define ERROR_STM_UNPROTECTABLE_RESOURCE 0x80010007
DOS line endings
Patch Set #1, Line 605: #define ERROR_STM_ALREADY_STARTED 0x80010008
DOS line endings
Patch Set #1, Line 606: #define ERROR_STM_WITHOUT_SMX_UNSUPPORTED 0x80010009
DOS line endings
Patch Set #1, Line 607: #define ERROR_STM_STOPPED 0x8001000A
DOS line endings
Patch Set #1, Line 608: #define ERROR_STM_BUFFER_TOO_SMALL 0x8001000B
DOS line endings
Patch Set #1, Line 609: #define ERROR_STM_INVALID_VMCS_DATABASE 0x8001000C
DOS line endings
Patch Set #1, Line 610: #define ERROR_STM_MALFORMED_RESOURCE_LIST 0x8001000D
DOS line endings
Patch Set #1, Line 611: #define ERROR_STM_INVALID_PAGECOUNT 0x8001000E
DOS line endings
Patch Set #1, Line 612: #define ERROR_STM_LOG_ALLOCATED 0x8001000F
DOS line endings
Patch Set #1, Line 613: #define ERROR_STM_LOG_NOT_ALLOCATED 0x80010010
DOS line endings
Patch Set #1, Line 614: #define ERROR_STM_LOG_NOT_STOPPED 0x80010011
DOS line endings
Patch Set #1, Line 615: #define ERROR_STM_LOG_NOT_STARTED 0x80010012
DOS line endings
Patch Set #1, Line 616: #define ERROR_STM_RESERVED_BIT_SET 0x80010013
DOS line endings
Patch Set #1, Line 617: #define ERROR_STM_NO_EVENTS_ENABLED 0x80010014
DOS line endings
Patch Set #1, Line 618: #define ERROR_STM_OUT_OF_RESOURCES 0x80010015
DOS line endings
Patch Set #1, Line 619: #define ERROR_STM_FUNCTION_NOT_SUPPORTED 0x80010016
DOS line endings
Patch Set #1, Line 620: #define ERROR_STM_UNPROTECTABLE 0x80010017
DOS line endings
Patch Set #1, Line 621: #define ERROR_STM_UNSUPPORTED_MSR_BIT 0x80010018
DOS line endings
Patch Set #1, Line 622: #define ERROR_STM_UNSPECIFIED 0x8001FFFF
DOS line endings
DOS line endings
Patch Set #1, Line 624: // SMM errors have bit 17 set
trailing whitespace
Patch Set #1, Line 625: #define ERROR_SMM_BAD_BUFFER 0x80020001
DOS line endings
Patch Set #1, Line 626: #define ERROR_SMM_INVALID_RSC 0x80020004
DOS line endings
Patch Set #1, Line 627: #define ERROR_SMM_INVALID_BUFFER_SIZE 0x80020005
DOS line endings
Patch Set #1, Line 628: #define ERROR_SMM_BUFFER_TOO_SHORT 0x80020006
DOS line endings
Patch Set #1, Line 629: #define ERROR_SMM_INVALID_LIST 0x80020007
DOS line endings
Patch Set #1, Line 630: #define ERROR_SMM_OUT_OF_MEMORY 0x80020008
DOS line endings
Patch Set #1, Line 631: #define ERROR_SMM_AFTER_INIT 0x80020009
DOS line endings
Patch Set #1, Line 632: #define ERROR_SMM_UNSPECIFIED 0x8002FFFF
DOS line endings
DOS line endings
Patch Set #1, Line 634: // Errors that apply to both have bits 15, 16, and 17 set
trailing whitespace
Patch Set #1, Line 635: #define ERROR_INVALID_API 0x80038001
DOS line endings
Patch Set #1, Line 636: #define ERROR_INVALID_PARAMETER 0x80038002
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 639: // STM TXT.ERRORCODE codes
trailing whitespace
trailing whitespace
Patch Set #1, Line 641: #define STM_CRASH_PROTECTION_EXCEPTION 0xC000F001
DOS line endings
Patch Set #1, Line 642: #define STM_CRASH_PROTECTION_EXCEPTION_FAILURE 0xC000F002
DOS line endings
Patch Set #1, Line 643: #define STM_CRASH_DOMAIN_DEGRADATION_FAILURE 0xC000F003
DOS line endings
Patch Set #1, Line 644: #define STM_CRASH_BIOS_PANIC 0xC000E000
DOS line endings
DOS line endings
Patch Set #1, Line 646: typedef struct {
DOS line endings
Patch Set #1, Line 647: uint32_t EventSerialNumber;
DOS line endings
Patch Set #1, Line 647: uint32_t EventSerialNumber;
please, no spaces at the start of a line
Patch Set #1, Line 648: uint16_t Type;
DOS line endings
Patch Set #1, Line 648: uint16_t Type;
please, no spaces at the start of a line
Patch Set #1, Line 649: uint16_t Lock :1;
DOS line endings
Patch Set #1, Line 649: uint16_t Lock :1;
please, no spaces at the start of a line
Patch Set #1, Line 650: uint16_t Valid :1;
DOS line endings
Patch Set #1, Line 650: uint16_t Valid :1;
please, no spaces at the start of a line
Patch Set #1, Line 651: uint16_t ReadByMle :1;
DOS line endings
Patch Set #1, Line 651: uint16_t ReadByMle :1;
please, no spaces at the start of a line
Patch Set #1, Line 652: uint16_t Wrapped :1;
DOS line endings
Patch Set #1, Line 652: uint16_t Wrapped :1;
please, no spaces at the start of a line
Patch Set #1, Line 653: uint16_t Reserved :12;
DOS line endings
Patch Set #1, Line 653: uint16_t Reserved :12;
please, no spaces at the start of a line
Patch Set #1, Line 654: } LOG_ENTRY_HEADER;
DOS line endings
DOS line endings
Patch Set #1, Line 656: typedef struct {
DOS line endings
Patch Set #1, Line 657: uint32_t Reserved;
DOS line endings
Patch Set #1, Line 657: uint32_t Reserved;
please, no spaces at the start of a line
Patch Set #1, Line 658: } ENTRY_EVT_LOG_STARTED;
DOS line endings
DOS line endings
Patch Set #1, Line 660: typedef struct {
DOS line endings
Patch Set #1, Line 661: uint32_t Reserved;
DOS line endings
Patch Set #1, Line 661: uint32_t Reserved;
please, no spaces at the start of a line
Patch Set #1, Line 662: } ENTRY_EVT_LOG_STOPPED;
DOS line endings
DOS line endings
Patch Set #1, Line 664: typedef struct {
DOS line endings
Patch Set #1, Line 665: uint32_t VmcallApiNumber;
DOS line endings
Patch Set #1, Line 665: uint32_t VmcallApiNumber;
please, no spaces at the start of a line
Patch Set #1, Line 666: } ENTRY_EVT_LOG_INVALID_PARAM;
DOS line endings
DOS line endings
Patch Set #1, Line 668: typedef struct {
DOS line endings
Patch Set #1, Line 669: STM_RSC Resource;
DOS line endings
Patch Set #1, Line 669: STM_RSC Resource;
please, no spaces at the start of a line
Patch Set #1, Line 670: } ENTRY_EVT_LOG_HANDLED_PROTECTION_EXCEPTION;
DOS line endings
DOS line endings
Patch Set #1, Line 672: typedef struct {
DOS line endings
Patch Set #1, Line 673: STM_RSC Resource;
DOS line endings
Patch Set #1, Line 673: STM_RSC Resource;
please, no spaces at the start of a line
Patch Set #1, Line 674: } ENTRY_EVT_BIOS_ACCESS_UNCLAIMED_RSC;
DOS line endings
DOS line endings
Patch Set #1, Line 676: typedef struct {
DOS line endings
Patch Set #1, Line 677: STM_RSC Resource;
DOS line endings
Patch Set #1, Line 677: STM_RSC Resource;
please, no spaces at the start of a line
Patch Set #1, Line 678: } ENTRY_EVT_MLE_RSC_PROT_GRANTED;
DOS line endings
DOS line endings
Patch Set #1, Line 680: typedef struct {
DOS line endings
Patch Set #1, Line 681: STM_RSC Resource;
DOS line endings
Patch Set #1, Line 681: STM_RSC Resource;
please, no spaces at the start of a line
Patch Set #1, Line 682: } ENTRY_EVT_MLE_RSC_PROT_DENIED;
DOS line endings
DOS line endings
Patch Set #1, Line 684: typedef struct {
DOS line endings
Patch Set #1, Line 685: STM_RSC Resource;
DOS line endings
Patch Set #1, Line 685: STM_RSC Resource;
please, no spaces at the start of a line
Patch Set #1, Line 686: } ENTRY_EVT_MLE_RSC_UNPROT;
DOS line endings
DOS line endings
Patch Set #1, Line 688: typedef struct {
DOS line endings
Patch Set #1, Line 689: STM_RSC Resource;
DOS line endings
Patch Set #1, Line 689: STM_RSC Resource;
please, no spaces at the start of a line
Patch Set #1, Line 690: } ENTRY_EVT_MLE_RSC_UNPROT_ERROR;
DOS line endings
DOS line endings
Patch Set #1, Line 692: typedef struct {
DOS line endings
Patch Set #1, Line 693: uint64_t VmcsPhysPointer;
DOS line endings
Patch Set #1, Line 693: uint64_t VmcsPhysPointer;
please, no spaces at the start of a line
Patch Set #1, Line 694: uint8_t ExpectedDomainType;
DOS line endings
Patch Set #1, Line 694: uint8_t ExpectedDomainType;
please, no spaces at the start of a line
Patch Set #1, Line 695: uint8_t DegradedDomainType;
DOS line endings
Patch Set #1, Line 695: uint8_t DegradedDomainType;
please, no spaces at the start of a line
Patch Set #1, Line 696: } ENTRY_EVT_MLE_DOMAIN_TYPE_DEGRADED;
DOS line endings
DOS line endings
Patch Set #1, Line 698: typedef union {
DOS line endings
Patch Set #1, Line 699: ENTRY_EVT_LOG_STARTED Started;
DOS line endings
Patch Set #1, Line 699: ENTRY_EVT_LOG_STARTED Started;
please, no spaces at the start of a line
Patch Set #1, Line 700: ENTRY_EVT_LOG_STOPPED Stopped;
DOS line endings
Patch Set #1, Line 700: ENTRY_EVT_LOG_STOPPED Stopped;
please, no spaces at the start of a line
Patch Set #1, Line 701: ENTRY_EVT_LOG_INVALID_PARAM InvalidParam;
DOS line endings
Patch Set #1, Line 701: ENTRY_EVT_LOG_INVALID_PARAM InvalidParam;
please, no spaces at the start of a line
Patch Set #1, Line 702: ENTRY_EVT_LOG_HANDLED_PROTECTION_EXCEPTION HandledProtectionException;
DOS line endings
Patch Set #1, Line 702: ENTRY_EVT_LOG_HANDLED_PROTECTION_EXCEPTION HandledProtectionException;
please, no spaces at the start of a line
Patch Set #1, Line 703: ENTRY_EVT_BIOS_ACCESS_UNCLAIMED_RSC BiosUnclaimedRsc;
DOS line endings
Patch Set #1, Line 703: ENTRY_EVT_BIOS_ACCESS_UNCLAIMED_RSC BiosUnclaimedRsc;
please, no spaces at the start of a line
Patch Set #1, Line 704: ENTRY_EVT_MLE_RSC_PROT_GRANTED MleRscProtGranted;
DOS line endings
Patch Set #1, Line 704: ENTRY_EVT_MLE_RSC_PROT_GRANTED MleRscProtGranted;
please, no spaces at the start of a line
Patch Set #1, Line 705: ENTRY_EVT_MLE_RSC_PROT_DENIED MleRscProtDenied;
DOS line endings
Patch Set #1, Line 705: ENTRY_EVT_MLE_RSC_PROT_DENIED MleRscProtDenied;
please, no spaces at the start of a line
Patch Set #1, Line 706: ENTRY_EVT_MLE_RSC_UNPROT MleRscUnprot;
DOS line endings
Patch Set #1, Line 706: ENTRY_EVT_MLE_RSC_UNPROT MleRscUnprot;
please, no spaces at the start of a line
Patch Set #1, Line 707: ENTRY_EVT_MLE_RSC_UNPROT_ERROR MleRscUnprotError;
DOS line endings
Patch Set #1, Line 707: ENTRY_EVT_MLE_RSC_UNPROT_ERROR MleRscUnprotError;
please, no spaces at the start of a line
Patch Set #1, Line 708: ENTRY_EVT_MLE_DOMAIN_TYPE_DEGRADED MleDomainTypeDegraded;
DOS line endings
Patch Set #1, Line 708: ENTRY_EVT_MLE_DOMAIN_TYPE_DEGRADED MleDomainTypeDegraded;
please, no spaces at the start of a line
Patch Set #1, Line 709: } LOG_ENTRY_DATA;
DOS line endings
DOS line endings
Patch Set #1, Line 711: typedef struct {
DOS line endings
Patch Set #1, Line 712: LOG_ENTRY_HEADER Hdr;
DOS line endings
Patch Set #1, Line 712: LOG_ENTRY_HEADER Hdr;
please, no spaces at the start of a line
Patch Set #1, Line 713: LOG_ENTRY_DATA Data;
DOS line endings
Patch Set #1, Line 713: LOG_ENTRY_DATA Data;
please, no spaces at the start of a line
Patch Set #1, Line 714: } STM_LOG_ENTRY;
DOS line endings
DOS line endings
Patch Set #1, Line 716: #define STM_LOG_ENTRY_SIZE 256
DOS line endings
DOS line endings
trailing whitespace
trailing whitespace
trailing whitespace
Patch Set #1, Line 721: #define STM_CONFIG_SMI_UNBLOCKING_BY_VMX_OFF 0x1
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 724: // TXT debug
trailing whitespace
trailing whitespace
Patch Set #1, Line 726: #define SW_SMI_STM_ADD_RUNTIME_RESOURCES_SUB_FUNC 0
DOS line endings
Patch Set #1, Line 727: #define SW_SMI_STM_READ_BIOS_RESOURCES_SUB_FUNC 1
DOS line endings
Patch Set #1, Line 728: #define SW_SMI_STM_REPLACE_BIOS_RESOURCES_SUB_FUNC 2
DOS line endings
DOS line endings
Patch Set #1, Line 730: typedef struct {
DOS line endings
Patch Set #1, Line 731: uint32_t BufferSize;
DOS line endings
Patch Set #1, Line 731: uint32_t BufferSize;
please, no spaces at the start of a line
Patch Set #1, Line 732: uint32_t Reserved;
DOS line endings
Patch Set #1, Line 732: uint32_t Reserved;
please, no spaces at the start of a line
Patch Set #1, Line 733: //uint8_t Data[];
trailing whitespace
Patch Set #1, Line 734: } TXT_BIOS_DEBUG;
DOS line endings
DOS line endings
Patch Set #1, Line 736: #pragma pack (pop)
DOS line endings
Patch Set #1, Line 736: #pragma pack (pop)
space prohibited between function name and open parenthesis '('
DOS line endings
Patch Set #1, Line 738: #endif
DOS line endings
File src/include/cpu/x86/StmPlatformResource.h:
Patch Set #1, Line 1: /** @file
trailing whitespace
Patch Set #1, Line 2: STM platform SMM resource
trailing whitespace
trailing whitespace
Patch Set #1, Line 4: Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
trailing whitespace
Patch Set #1, Line 5: This program and the accompanying materials
trailing whitespace
Patch Set #1, Line 6: are licensed and made available under the terms and conditions of the BSD License
trailing whitespace
Patch Set #1, Line 6: are licensed and made available under the terms and conditions of the BSD License
line over 80 characters
Patch Set #1, Line 7: which accompanies this distribution. The full text of the license may be found at
trailing whitespace
Patch Set #1, Line 7: which accompanies this distribution. The full text of the license may be found at
line over 80 characters
Patch Set #1, Line 8: http://opensource.org/licenses/bsd-license.php.
trailing whitespace
trailing whitespace
Patch Set #1, Line 10: THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
trailing whitespace
Patch Set #1, Line 11: WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
trailing whitespace
trailing whitespace
DOS line endings
DOS line endings
Patch Set #1, Line 15: #ifndef _STM_PLATFORM_RESOURCE_H_
DOS line endings
Patch Set #1, Line 16: #define _STM_PLATFORM_RESOURCE_H_
DOS line endings
DOS line endings
Patch Set #1, Line 18: #define MASK0 0
DOS line endings
Patch Set #1, Line 19: #define MASK64 0xFFFFFFFFFFFFFFFFull
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 22: // LPC
trailing whitespace
trailing whitespace
Patch Set #1, Line 24: #define LPC_BUS 0
DOS line endings
Patch Set #1, Line 25: #define LPC_DEVICE 31
DOS line endings
Patch Set #1, Line 26: #define LPC_FUNCTION 0
DOS line endings
Patch Set #1, Line 27: #define R_ACPI_PM_BASE 0x40
DOS line endings
Patch Set #1, Line 28: #define ACPI_PM_BASE_MASK 0xFFF8
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 31: // MSRs
trailing whitespace
trailing whitespace
Patch Set #1, Line 33: #define IA32_APIC_BASE_MSR_INDEX 0x1B
DOS line endings
Patch Set #1, Line 34: #define SMRR_PHYSBASE_MSR 0x1F2
DOS line endings
Patch Set #1, Line 35: #define SMRR_PHYSMASK_MSR 0x1F3
DOS line endings
DOS line endings
trailing whitespace
trailing whitespace
Patch Set #1, Line 39: Add resources to BIOS resource database.
trailing whitespace
trailing whitespace
DOS line endings
DOS line endings
function definition argument 'void' should also have an identifier name
Patch Set #1, Line 43: AddResourcesCmd (
DOS line endings
Patch Set #1, Line 43: AddResourcesCmd (
space prohibited between function name and open parenthesis '('
DOS line endings
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 47: #endif
DOS line endings
File src/include/cpu/x86/smm.h:
Patch Set #1, Line 515: u32 mseg;
code indent should use tabs where possible
Patch Set #1, Line 515: u32 mseg;
please, no spaces at the start of a line
File src/security/stm/Kconfig:
Patch Set #1, Line 14: endif #STM
trailing whitespace
trailing whitespace
File src/security/stm/SmmStm.c:
Patch Set #1, Line 8: are licensed and made available under the terms and conditions of the BSD License
line over 80 characters
Patch Set #1, Line 9: which accompanies this distribution. The full text of the license may be found at
line over 80 characters
Patch Set #1, Line 33: #define IA32_PG_P 1<<0
Macros with complex values should be enclosed in parentheses
Patch Set #1, Line 34: #define IA32_PG_RW 1<<1
Macros with complex values should be enclosed in parentheses
Patch Set #1, Line 35: #define IA32_PG_PS 1<<7
Macros with complex values should be enclosed in parentheses
Patch Set #1, Line 39: #define STM_SIZE_TO_PAGES(a) (((a) >> STM_PAGE_SHIFT) + (((a) & STM_PAGE_MASK) ? 1 : 0))
line over 80 characters
Patch Set #1, Line 40: #define STM_PAGES_TO_SIZE(a) ( (a) << STM_PAGE_SHIFT)
space prohibited after that open parenthesis '('
Patch Set #1, Line 51: uint32_t GetVmcsSize (void);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 53: void StmGen4GPageTableX64 (uint32_t PageTableBase);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 54: bool StmCheckStmImage (void * StmImage, uint32_t StmImageSize);
"foo * bar" should be "foo *bar"
Patch Set #1, Line 54: bool StmCheckStmImage (void * StmImage, uint32_t StmImageSize);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 55: void StmLoadStmImage (void * StmImage, UINTN StmImageSize);
"foo * bar" should be "foo *bar"
Patch Set #1, Line 55: void StmLoadStmImage (void * StmImage, UINTN StmImageSize);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 57: bool HandleSingleResource (STM_RSC *Resource, STM_RSC *Record);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 58: void AddSingleResource (STM_RSC *Resource);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 59: void AddResource (STM_RSC *ResourceList, uint32_t NumEntries);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 60: bool ValidateResource (STM_RSC *ResourceList, uint32_t NumEntries);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 61: UINTN GetResourceSize (STM_RSC *ResourceList, uint32_t NumEntries);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 93: struct mp_ops ops;
code indent should use tabs where possible
Patch Set #1, Line 93: struct mp_ops ops;
please, no spaces at the start of a line
Patch Set #1, Line 94: int cpu_count;
code indent should use tabs where possible
Patch Set #1, Line 94: int cpu_count;
please, no spaces at the start of a line
Patch Set #1, Line 95: uintptr_t perm_smbase;
code indent should use tabs where possible
Patch Set #1, Line 95: uintptr_t perm_smbase;
please, no spaces at the start of a line
Patch Set #1, Line 96: size_t perm_smsize;
code indent should use tabs where possible
Patch Set #1, Line 96: size_t perm_smsize;
please, no spaces at the start of a line
Patch Set #1, Line 97: size_t smm_save_state_size;
code indent should use tabs where possible
Patch Set #1, Line 97: size_t smm_save_state_size;
please, no spaces at the start of a line
Patch Set #1, Line 98: int do_smm;
code indent should use tabs where possible
Patch Set #1, Line 98: int do_smm;
please, no spaces at the start of a line
Patch Set #1, Line 112: {END_OF_RESOURCES, sizeof (STM_RSC_END)},
please, no spaces at the start of a line
Patch Set #1, Line 112: {END_OF_RESOURCES, sizeof (STM_RSC_END)},
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 137: HandleSingleResource (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 138: STM_RSC *Resource,
please, no spaces at the start of a line
Patch Set #1, Line 139: STM_RSC *Record
please, no spaces at the start of a line
please, no spaces at the start of a line
trailing whitespace
Patch Set #1, Line 142: uint64_t ResourceLo;
please, no spaces at the start of a line
Patch Set #1, Line 143: uint64_t ResourceHi;
please, no spaces at the start of a line
Patch Set #1, Line 144: uint64_t RecordLo;
please, no spaces at the start of a line
Patch Set #1, Line 145: uint64_t RecordHi;
please, no spaces at the start of a line
Patch Set #1, Line 147: ResourceLo = 0;
please, no spaces at the start of a line
Patch Set #1, Line 148: ResourceHi = 0;
please, no spaces at the start of a line
Patch Set #1, Line 149: RecordLo = 0;
please, no spaces at the start of a line
Patch Set #1, Line 150: RecordHi = 0;
please, no spaces at the start of a line
trailing whitespace
Patch Set #1, Line 158: switch (Resource->Header.RscType) {
please, no spaces at the start of a line
Patch Set #1, Line 159: case MEM_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 160: case MMIO_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 161: ResourceLo = Resource->Mem.Base;
please, no spaces at the start of a line
Patch Set #1, Line 162: ResourceHi = Resource->Mem.Base + Resource->Mem.Length;
please, no spaces at the start of a line
Patch Set #1, Line 163: RecordLo = Record->Mem.Base;
please, no spaces at the start of a line
Patch Set #1, Line 164: RecordHi = Record->Mem.Base + Record->Mem.Length;
please, no spaces at the start of a line
Patch Set #1, Line 165: if (Resource->Mem.RWXAttributes != Record->Mem.RWXAttributes) {
please, no spaces at the start of a line
Patch Set #1, Line 165: if (Resource->Mem.RWXAttributes != Record->Mem.RWXAttributes) {
suspect code indent for conditional statements (4, 6)
Patch Set #1, Line 166: if ((ResourceLo == RecordLo) && (ResourceHi == RecordHi)) {
please, no spaces at the start of a line
Patch Set #1, Line 167: Record->Mem.RWXAttributes = Resource->Mem.RWXAttributes | Record->Mem.RWXAttributes;
line over 80 characters
Patch Set #1, Line 167: Record->Mem.RWXAttributes = Resource->Mem.RWXAttributes | Record->Mem.RWXAttributes;
code indent should use tabs where possible
Patch Set #1, Line 167: Record->Mem.RWXAttributes = Resource->Mem.RWXAttributes | Record->Mem.RWXAttributes;
please, no spaces at the start of a line
Patch Set #1, Line 168: return true;
code indent should use tabs where possible
Patch Set #1, Line 168: return true;
please, no spaces at the start of a line
Patch Set #1, Line 169: } else {
please, no spaces at the start of a line
Patch Set #1, Line 170: return false;
code indent should use tabs where possible
Patch Set #1, Line 170: return false;
please, no spaces at the start of a line
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 173: break;
please, no spaces at the start of a line
Patch Set #1, Line 174: case IO_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 175: case TRAPPED_IO_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 176: ResourceLo = (uint64_t) Resource->Io.Base;
please, no spaces at the start of a line
Patch Set #1, Line 177: ResourceHi = (uint64_t) Resource->Io.Base + (uint64_t) Resource->Io.Length;
please, no spaces at the start of a line
Patch Set #1, Line 178: RecordLo = (uint64_t) Record->Io.Base;
please, no spaces at the start of a line
Patch Set #1, Line 179: RecordHi = (uint64_t) Record->Io.Base + (uint64_t) Record->Io.Length;
please, no spaces at the start of a line
Patch Set #1, Line 180: break;
please, no spaces at the start of a line
Patch Set #1, Line 181: case PCI_CFG_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 182: if ((Resource->PciCfg.OriginatingBusNumber != Record->PciCfg.OriginatingBusNumber) ||
line over 80 characters
Patch Set #1, Line 182: if ((Resource->PciCfg.OriginatingBusNumber != Record->PciCfg.OriginatingBusNumber) ||
please, no spaces at the start of a line
Patch Set #1, Line 182: if ((Resource->PciCfg.OriginatingBusNumber != Record->PciCfg.OriginatingBusNumber) ||
suspect code indent for conditional statements (4, 6)
Patch Set #1, Line 183: (Resource->PciCfg.LastNodeIndex != Record->PciCfg.LastNodeIndex)) {
code indent should use tabs where possible
Patch Set #1, Line 183: (Resource->PciCfg.LastNodeIndex != Record->PciCfg.LastNodeIndex)) {
please, no spaces at the start of a line
Patch Set #1, Line 184: return false;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, 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
Patch Set #1, 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
Patch Set #1, Line 186: if (memcmp (Resource->PciCfg.PciDevicePath, Record->PciCfg.PciDevicePath, sizeof(STM_PCI_DEVICE_PATH_NODE) * (Resource->PciCfg.LastNodeIndex + 1)) != 0) {
suspect code indent for conditional statements (4, 6)
Patch Set #1, 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 '('
Patch Set #1, 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
Patch Set #1, Line 187: return false;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 189: ResourceLo = (uint64_t) Resource->PciCfg.Base;
please, no spaces at the start of a line
Patch Set #1, Line 190: ResourceHi = (uint64_t) Resource->PciCfg.Base + (uint64_t) Resource->PciCfg.Length;
line over 80 characters
Patch Set #1, Line 190: ResourceHi = (uint64_t) Resource->PciCfg.Base + (uint64_t) Resource->PciCfg.Length;
please, no spaces at the start of a line
Patch Set #1, Line 191: RecordLo = (uint64_t) Record->PciCfg.Base;
please, no spaces at the start of a line
Patch Set #1, Line 192: RecordHi = (uint64_t) Record->PciCfg.Base + (uint64_t) Record->PciCfg.Length;
line over 80 characters
Patch Set #1, Line 192: RecordHi = (uint64_t) Record->PciCfg.Base + (uint64_t) Record->PciCfg.Length;
please, no spaces at the start of a line
Patch Set #1, Line 193: if (Resource->PciCfg.RWAttributes != Record->PciCfg.RWAttributes) {
please, no spaces at the start of a line
Patch Set #1, Line 193: if (Resource->PciCfg.RWAttributes != Record->PciCfg.RWAttributes) {
suspect code indent for conditional statements (4, 6)
Patch Set #1, Line 194: if ((ResourceLo == RecordLo) && (ResourceHi == RecordHi)) {
please, no spaces at the start of a line
Patch Set #1, Line 195: Record->PciCfg.RWAttributes = Resource->PciCfg.RWAttributes | Record->PciCfg.RWAttributes;
line over 80 characters
Patch Set #1, Line 195: Record->PciCfg.RWAttributes = Resource->PciCfg.RWAttributes | Record->PciCfg.RWAttributes;
code indent should use tabs where possible
Patch Set #1, Line 195: Record->PciCfg.RWAttributes = Resource->PciCfg.RWAttributes | Record->PciCfg.RWAttributes;
please, no spaces at the start of a line
Patch Set #1, Line 196: return true;
code indent should use tabs where possible
Patch Set #1, Line 196: return true;
please, no spaces at the start of a line
Patch Set #1, Line 197: } else {
please, no spaces at the start of a line
Patch Set #1, Line 198: return false;
code indent should use tabs where possible
Patch Set #1, Line 198: return false;
please, no spaces at the start of a line
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 201: break;
please, no spaces at the start of a line
Patch Set #1, Line 202: case MACHINE_SPECIFIC_REG:
please, no spaces at the start of a line
trailing whitespace
Patch Set #1, Line 206: if (Resource->Msr.MsrIndex != Record->Msr.MsrIndex) {
please, no spaces at the start of a line
Patch Set #1, Line 206: if (Resource->Msr.MsrIndex != Record->Msr.MsrIndex) {
suspect code indent for conditional statements (4, 6)
Patch Set #1, Line 206: if (Resource->Msr.MsrIndex != Record->Msr.MsrIndex) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 207: return false;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 209: Record->Msr.ReadMask |= Resource->Msr.ReadMask;
trailing whitespace
Patch Set #1, Line 209: Record->Msr.ReadMask |= Resource->Msr.ReadMask;
please, no spaces at the start of a line
Patch Set #1, Line 210: Record->Msr.WriteMask |= Resource->Msr.WriteMask;
trailing whitespace
Patch Set #1, Line 210: Record->Msr.WriteMask |= Resource->Msr.WriteMask;
please, no spaces at the start of a line
Patch Set #1, Line 211: return true;
please, no spaces at the start of a line
Patch Set #1, Line 213: return false;
please, no spaces at the start of a line
please, no spaces at the start of a line
trailing whitespace
Patch Set #1, Line 218: if ((ResourceHi < RecordLo) || (ResourceLo > RecordHi)) {
please, no spaces at the start of a line
Patch Set #1, Line 218: if ((ResourceHi < RecordLo) || (ResourceLo > RecordHi)) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 218: if ((ResourceHi < RecordLo) || (ResourceLo > RecordHi)) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 219: return false;
please, no spaces at the start of a line
please, no spaces at the start of a line
trailing whitespace
Patch Set #1, Line 225: if ((ResourceLo >= RecordLo) && (ResourceHi <= RecordHi)) {
please, no spaces at the start of a line
Patch Set #1, Line 225: if ((ResourceLo >= RecordLo) && (ResourceHi <= RecordHi)) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 225: if ((ResourceLo >= RecordLo) && (ResourceHi <= RecordHi)) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 226: return true;
please, no spaces at the start of a line
please, no spaces at the start of a line
trailing whitespace
Patch Set #1, Line 232: ResourceLo = (ResourceLo < RecordLo) ? ResourceLo : RecordLo;
please, no spaces at the start of a line
Patch Set #1, Line 233: ResourceHi = (ResourceHi > RecordHi) ? ResourceHi : RecordHi;
please, no spaces at the start of a line
Patch Set #1, Line 235: switch (Resource->Header.RscType) {
please, no spaces at the start of a line
Patch Set #1, Line 236: case MEM_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 237: case MMIO_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 238: Record->Mem.Base = ResourceLo;
please, no spaces at the start of a line
Patch Set #1, Line 239: Record->Mem.Length = ResourceHi - ResourceLo;
please, no spaces at the start of a line
Patch Set #1, Line 240: break;
please, no spaces at the start of a line
Patch Set #1, Line 241: case IO_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 242: case TRAPPED_IO_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 243: Record->Io.Base = (uint64_t) ResourceLo;
please, no spaces at the start of a line
Patch Set #1, Line 244: Record->Io.Length = (uint64_t) (ResourceHi - ResourceLo);
please, no spaces at the start of a line
Patch Set #1, Line 245: break;
please, no spaces at the start of a line
Patch Set #1, Line 246: case PCI_CFG_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 247: Record->PciCfg.Base = (uint64_t) ResourceLo;
please, no spaces at the start of a line
Patch Set #1, Line 248: Record->PciCfg.Length = (uint64_t) (ResourceHi - ResourceLo);
please, no spaces at the start of a line
Patch Set #1, Line 249: break;
trailing whitespace
Patch Set #1, Line 249: break;
please, no spaces at the start of a line
Patch Set #1, Line 251: return false;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 254: return true;
please, no spaces at the start of a line
Patch Set #1, Line 265: AddSingleResource (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 266: STM_RSC *Resource
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 269: STM_RSC *Record;
please, no spaces at the start of a line
Patch Set #1, Line 271: Record = (STM_RSC *)mStmResourcesPtr;
please, no spaces at the start of a line
Patch Set #1, Line 273: while (true) {
please, no spaces at the start of a line
Patch Set #1, Line 273: while (true) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 274: if (Record->Header.RscType == END_OF_RESOURCES) {
please, no spaces at the start of a line
Patch Set #1, Line 274: if (Record->Header.RscType == END_OF_RESOURCES) {
suspect code indent for conditional statements (4, 6)
Patch Set #1, Line 274: if (Record->Header.RscType == END_OF_RESOURCES) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 275: break;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 280: if (Resource->Header.RscType != Record->Header.RscType) {
please, no spaces at the start of a line
Patch Set #1, Line 280: if (Resource->Header.RscType != Record->Header.RscType) {
suspect code indent for conditional statements (4, 6)
Patch Set #1, Line 281: Record = (STM_RSC *)((void *)Record + Record->Header.Length);
please, no spaces at the start of a line
Patch Set #1, Line 282: continue;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 287: if (HandleSingleResource (Resource, Record)) {
please, no spaces at the start of a line
Patch Set #1, Line 287: if (HandleSingleResource (Resource, Record)) {
suspect code indent for conditional statements (4, 6)
Patch Set #1, Line 287: if (HandleSingleResource (Resource, Record)) {
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 287: if (HandleSingleResource (Resource, Record)) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 288: return ;
please, no spaces at the start of a line
Patch Set #1, Line 288: return ;
space prohibited before semicolon
please, no spaces at the start of a line
Patch Set #1, Line 290: Record = (STM_RSC *)((void *)Record + Record->Header.Length);
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 296: memcpy (
please, no spaces at the start of a line
Patch Set #1, Line 296: memcpy (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 297: mStmResourcesPtr + mStmResourceSizeUsed - sizeof(mRscEndNode),
please, no spaces at the start of a line
Patch Set #1, Line 298: Resource,
please, no spaces at the start of a line
Patch Set #1, Line 299: Resource->Header.Length
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 301: memcpy (
please, no spaces at the start of a line
Patch Set #1, Line 301: memcpy (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 302: mStmResourcesPtr + mStmResourceSizeUsed - sizeof(mRscEndNode) + Resource->Header.Length,
line over 80 characters
Patch Set #1, Line 302: mStmResourcesPtr + mStmResourceSizeUsed - sizeof(mRscEndNode) + Resource->Header.Length,
please, no spaces at the start of a line
Patch Set #1, Line 303: &mRscEndNode,
please, no spaces at the start of a line
Patch Set #1, Line 304: sizeof(mRscEndNode)
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 306: mStmResourceSizeUsed += Resource->Header.Length;
please, no spaces at the start of a line
Patch Set #1, Line 307: mStmResourceSizeAvailable = mStmResourceTotalSize - mStmResourceSizeUsed;
please, no spaces at the start of a line
Patch Set #1, Line 309: return ;
please, no spaces at the start of a line
Patch Set #1, Line 309: return ;
space prohibited before semicolon
Patch Set #1, Line 318: If 0, list must be terminated by END_OF_RESOURCES.
code indent should use tabs where possible
Patch Set #1, Line 322: AddResource (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 323: STM_RSC *ResourceList,
please, no spaces at the start of a line
Patch Set #1, Line 324: uint32_t NumEntries
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 327: uint32_t Count;
please, no spaces at the start of a line
Patch Set #1, Line 328: UINTN Index;
please, no spaces at the start of a line
Patch Set #1, Line 329: STM_RSC *Resource;
please, no spaces at the start of a line
Patch Set #1, Line 331: if (NumEntries == 0) {
please, no spaces at the start of a line
Patch Set #1, Line 331: if (NumEntries == 0) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 331: if (NumEntries == 0) {
braces {} are not necessary for any arm of this statement
Patch Set #1, Line 332: Count = 0xFFFFFFFF;
please, no spaces at the start of a line
Patch Set #1, Line 333: } else {
please, no spaces at the start of a line
Patch Set #1, Line 333: } else {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 334: Count = NumEntries;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 337: Resource = ResourceList;
please, no spaces at the start of a line
trailing whitespace
please, no spaces at the start of a line
Patch Set #1, Line 339: for (Index = 0; Index < Count; Index++) {
please, no spaces at the start of a line
Patch Set #1, Line 339: for (Index = 0; Index < Count; Index++) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 340: if (Resource->Header.RscType == END_OF_RESOURCES) {
please, no spaces at the start of a line
Patch Set #1, Line 340: if (Resource->Header.RscType == END_OF_RESOURCES) {
suspect code indent for conditional statements (4, 6)
Patch Set #1, Line 340: if (Resource->Header.RscType == END_OF_RESOURCES) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 341: return ;
please, no spaces at the start of a line
Patch Set #1, Line 341: return ;
space prohibited before semicolon
please, no spaces at the start of a line
Patch Set #1, Line 343: AddSingleResource (Resource);
please, no spaces at the start of a line
Patch Set #1, Line 343: AddSingleResource (Resource);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 344: Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length);
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 346: return ;
please, no spaces at the start of a line
Patch Set #1, Line 346: return ;
space prohibited before semicolon
Patch Set #1, Line 355: If 0, list must be terminated by END_OF_RESOURCES.
code indent should use tabs where possible
Patch Set #1, Line 362: ValidateResource (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 363: STM_RSC *ResourceList,
please, no spaces at the start of a line
Patch Set #1, Line 364: uint32_t NumEntries
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 367: uint32_t Count;
please, no spaces at the start of a line
Patch Set #1, Line 368: UINTN Index;
please, no spaces at the start of a line
Patch Set #1, Line 369: STM_RSC *Resource;
please, no spaces at the start of a line
Patch Set #1, Line 370: UINTN SubIndex;
please, no spaces at the start of a line
Patch Set #1, Line 374: // END_OF_RESOURCES.
trailing whitespace
trailing whitespace
Patch Set #1, Line 376: if (NumEntries == 0) {
please, no spaces at the start of a line
Patch Set #1, Line 376: if (NumEntries == 0) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 376: if (NumEntries == 0) {
braces {} are not necessary for any arm of this statement
Patch Set #1, Line 377: Count = 0xFFFFFFFF;
please, no spaces at the start of a line
Patch Set #1, Line 378: } else {
please, no spaces at the start of a line
Patch Set #1, Line 378: } else {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 379: Count = NumEntries;
please, no spaces at the start of a line
please, no spaces at the start of a line
trailing whitespace
Patch Set #1, Line 385: Resource = ResourceList;
please, no spaces at the start of a line
trailing whitespace
please, no spaces at the start of a line
Patch Set #1, Line 387: for (Index = 0; Index < Count; Index++) {
please, no spaces at the start of a line
Patch Set #1, Line 387: for (Index = 0; Index < Count; Index++) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 388: printk(BIOS_DEBUG, "ValidateResource (%llu) - RscType(%x)\n", Index, Resource->Header.RscType);
line over 80 characters
Patch Set #1, Line 388: printk(BIOS_DEBUG, "ValidateResource (%llu) - RscType(%x)\n", Index, Resource->Header.RscType);
please, no spaces at the start of a line
Patch Set #1, Line 388: 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
Patch Set #1, Line 390: // Validate resource.
trailing whitespace
trailing whitespace
Patch Set #1, Line 392: switch (Resource->Header.RscType) {
please, no spaces at the start of a line
Patch Set #1, Line 392: switch (Resource->Header.RscType) {
switch and case should be at the same indent
Patch Set #1, Line 393: case END_OF_RESOURCES:
please, no spaces at the start of a line
Patch Set #1, Line 394: if (Resource->Header.Length != sizeof (STM_RSC_END)) {
code indent should use tabs where possible
Patch Set #1, Line 394: if (Resource->Header.Length != sizeof (STM_RSC_END)) {
please, no spaces at the start of a line
Patch Set #1, Line 394: if (Resource->Header.Length != sizeof (STM_RSC_END)) {
suspect code indent for conditional statements (8, 10)
Patch Set #1, Line 394: if (Resource->Header.Length != sizeof (STM_RSC_END)) {
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 394: if (Resource->Header.Length != sizeof (STM_RSC_END)) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 395: return false;
code indent should use tabs where possible
Patch Set #1, Line 395: return false;
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
code indent should use tabs where possible
Patch Set #1, Line 398: // If we are passed actual number of resources to add,
code indent should use tabs where possible
Patch Set #1, Line 399: // END_OF_RESOURCES structure between them is considered an
code indent should use tabs where possible
Patch Set #1, Line 400: // error. If NumEntries == 0 END_OF_RESOURCES is a termination.
trailing whitespace
Patch Set #1, Line 400: // error. If NumEntries == 0 END_OF_RESOURCES is a termination.
code indent should use tabs where possible
code indent should use tabs where possible
Patch Set #1, Line 402: if (NumEntries != 0) {
code indent should use tabs where possible
Patch Set #1, Line 402: if (NumEntries != 0) {
please, no spaces at the start of a line
Patch Set #1, Line 402: if (NumEntries != 0) {
suspect code indent for conditional statements (8, 10)
Patch Set #1, Line 403: return false;
code indent should use tabs where possible
Patch Set #1, Line 403: return false;
please, no spaces at the start of a line
Patch Set #1, Line 404: } else {
code indent should use tabs where possible
Patch Set #1, Line 404: } else {
please, no spaces at the start of a line
Patch Set #1, Line 404: } else {
suspect code indent for conditional statements (8, 10)
code indent should use tabs where possible
Patch Set #1, Line 406: // If NumEntries == 0 and list reached end - return success.
code indent should use tabs where possible
trailing whitespace
code indent should use tabs where possible
Patch Set #1, Line 408: return true;
code indent should use tabs where possible
Patch Set #1, Line 408: return true;
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 410: break;
code indent should use tabs where possible
Patch Set #1, Line 410: break;
please, no spaces at the start of a line
Patch Set #1, Line 412: case MEM_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 413: case MMIO_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 414: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) {
code indent should use tabs where possible
Patch Set #1, Line 414: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) {
please, no spaces at the start of a line
Patch Set #1, Line 414: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) {
suspect code indent for conditional statements (8, 10)
Patch Set #1, Line 414: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) {
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 414: if (Resource->Header.Length != sizeof (STM_RSC_MEM_DESC)) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 415: return false;
code indent should use tabs where possible
Patch Set #1, Line 415: return false;
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 418: if (Resource->Mem.RWXAttributes > FULL_ACCS) {
code indent should use tabs where possible
Patch Set #1, Line 418: if (Resource->Mem.RWXAttributes > FULL_ACCS) {
please, no spaces at the start of a line
Patch Set #1, Line 418: if (Resource->Mem.RWXAttributes > FULL_ACCS) {
suspect code indent for conditional statements (8, 10)
Patch Set #1, Line 418: if (Resource->Mem.RWXAttributes > FULL_ACCS) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 419: return false;
code indent should use tabs where possible
Patch Set #1, Line 419: return false;
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 421: break;
code indent should use tabs where possible
Patch Set #1, Line 421: break;
please, no spaces at the start of a line
trailing whitespace
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 423: case IO_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 424: case TRAPPED_IO_RANGE:
trailing whitespace
Patch Set #1, Line 424: case TRAPPED_IO_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 425: if (Resource->Header.Length != sizeof (STM_RSC_IO_DESC)) {
code indent should use tabs where possible
Patch Set #1, Line 425: if (Resource->Header.Length != sizeof (STM_RSC_IO_DESC)) {
please, no spaces at the start of a line
Patch Set #1, Line 425: if (Resource->Header.Length != sizeof (STM_RSC_IO_DESC)) {
suspect code indent for conditional statements (8, 10)
Patch Set #1, Line 425: if (Resource->Header.Length != sizeof (STM_RSC_IO_DESC)) {
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 425: if (Resource->Header.Length != sizeof (STM_RSC_IO_DESC)) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 426: return false;
code indent should use tabs where possible
Patch Set #1, Line 426: return false;
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 429: if ((Resource->Io.Base + Resource->Io.Length) > 0xFFFF) {
code indent should use tabs where possible
Patch Set #1, Line 429: if ((Resource->Io.Base + Resource->Io.Length) > 0xFFFF) {
please, no spaces at the start of a line
Patch Set #1, Line 429: if ((Resource->Io.Base + Resource->Io.Length) > 0xFFFF) {
suspect code indent for conditional statements (8, 10)
Patch Set #1, Line 429: if ((Resource->Io.Base + Resource->Io.Length) > 0xFFFF) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 430: return false;
code indent should use tabs where possible
Patch Set #1, Line 430: return false;
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 432: break;
code indent should use tabs where possible
Patch Set #1, Line 432: break;
please, no spaces at the start of a line
Patch Set #1, Line 434: case PCI_CFG_RANGE:
please, no spaces at the start of a line
Patch Set #1, Line 435: 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
Patch Set #1, Line 435: 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
Patch Set #1, Line 435: 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
Patch Set #1, Line 435: 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
Patch Set #1, Line 436: if (Resource->Header.Length != sizeof (STM_RSC_PCI_CFG_DESC) + (sizeof(STM_PCI_DEVICE_PATH_NODE) * Resource->PciCfg.LastNodeIndex)) {
line over 80 characters
Patch Set #1, Line 436: 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
Patch Set #1, Line 436: 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
Patch Set #1, Line 436: 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)
Patch Set #1, Line 436: 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 '('
Patch Set #1, Line 436: 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
Patch Set #1, Line 437: return false;
code indent should use tabs where possible
Patch Set #1, Line 437: return false;
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 439: for (SubIndex = 0; SubIndex <= Resource->PciCfg.LastNodeIndex; SubIndex++) {
line over 80 characters
Patch Set #1, Line 439: for (SubIndex = 0; SubIndex <= Resource->PciCfg.LastNodeIndex; SubIndex++) {
code indent should use tabs where possible
Patch Set #1, Line 439: for (SubIndex = 0; SubIndex <= Resource->PciCfg.LastNodeIndex; SubIndex++) {
please, no spaces at the start of a line
Patch Set #1, Line 439: for (SubIndex = 0; SubIndex <= Resource->PciCfg.LastNodeIndex; SubIndex++) {
suspect code indent for conditional statements (8, 10)
Patch Set #1, Line 440: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) {
line over 80 characters
Patch Set #1, Line 440: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) {
code indent should use tabs where possible
Patch Set #1, Line 440: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) {
please, no spaces at the start of a line
Patch Set #1, Line 440: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) {
suspect code indent for conditional statements (10, 12)
Patch Set #1, Line 440: if ((Resource->PciCfg.PciDevicePath[SubIndex].PciDevice > 0x1F) || (Resource->PciCfg.PciDevicePath[SubIndex].PciFunction > 7)) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 441: return false;
code indent should use tabs where possible
Patch Set #1, Line 441: return false;
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 444: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) {
code indent should use tabs where possible
Patch Set #1, Line 444: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) {
please, no spaces at the start of a line
Patch Set #1, Line 444: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) {
suspect code indent for conditional statements (8, 10)
Patch Set #1, Line 444: if ((Resource->PciCfg.Base + Resource->PciCfg.Length) > 0x1000) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 445: return false;
code indent should use tabs where possible
Patch Set #1, Line 445: return false;
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 447: break;
code indent should use tabs where possible
Patch Set #1, Line 447: break;
please, no spaces at the start of a line
Patch Set #1, Line 449: case MACHINE_SPECIFIC_REG:
please, no spaces at the start of a line
Patch Set #1, Line 450: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) {
code indent should use tabs where possible
Patch Set #1, Line 450: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) {
please, no spaces at the start of a line
Patch Set #1, Line 450: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) {
suspect code indent for conditional statements (8, 10)
Patch Set #1, Line 450: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) {
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 450: if (Resource->Header.Length != sizeof (STM_RSC_MSR_DESC)) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 451: return false;
code indent should use tabs where possible
Patch Set #1, Line 451: return false;
please, no spaces at the start of a line
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 453: break;
code indent should use tabs where possible
Patch Set #1, Line 453: break;
please, no spaces at the start of a line
trailing whitespace
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 455: default :
trailing whitespace
Patch Set #1, Line 455: default :
please, no spaces at the start of a line
Patch Set #1, Line 455: default :
space prohibited before that ':' (ctx:WxW)
Patch Set #1, Line 456: printk(BIOS_DEBUG, "ValidateResource - Unknown RscType(%x)\n", Resource->Header.RscType);
line over 80 characters
Patch Set #1, Line 456: printk(BIOS_DEBUG, "ValidateResource - Unknown RscType(%x)\n", Resource->Header.RscType);
code indent should use tabs where possible
Patch Set #1, Line 456: printk(BIOS_DEBUG, "ValidateResource - Unknown RscType(%x)\n", Resource->Header.RscType);
please, no spaces at the start of a line
Patch Set #1, Line 456: 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
Patch Set #1, Line 457: return false;
code indent should use tabs where possible
Patch Set #1, Line 457: return false;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 459: Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length);
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 461: return true;
please, no spaces at the start of a line
Patch Set #1, Line 471: If 0, list must be terminated by END_OF_RESOURCES.
code indent should use tabs where possible
Patch Set #1, Line 478: GetResourceSize (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 479: STM_RSC *ResourceList,
please, no spaces at the start of a line
Patch Set #1, Line 480: uint32_t NumEntries
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 483: uint32_t Count;
please, no spaces at the start of a line
Patch Set #1, Line 484: UINTN Index;
please, no spaces at the start of a line
Patch Set #1, Line 485: STM_RSC *Resource;
please, no spaces at the start of a line
Patch Set #1, Line 487: Resource = ResourceList;
please, no spaces at the start of a line
Patch Set #1, Line 491: // END_OF_RESOURCES.
trailing whitespace
trailing whitespace
Patch Set #1, Line 493: if (NumEntries == 0) {
please, no spaces at the start of a line
Patch Set #1, Line 493: if (NumEntries == 0) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 493: if (NumEntries == 0) {
braces {} are not necessary for any arm of this statement
Patch Set #1, Line 494: Count = 0xFFFFFFFF;
please, no spaces at the start of a line
Patch Set #1, Line 495: } else {
please, no spaces at the start of a line
Patch Set #1, Line 495: } else {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 496: Count = NumEntries;
please, no spaces at the start of a line
please, no spaces at the start of a line
trailing whitespace
Patch Set #1, Line 502: Resource = ResourceList;
please, no spaces at the start of a line
trailing whitespace
please, no spaces at the start of a line
Patch Set #1, Line 504: for (Index = 0; Index < Count; Index++) {
please, no spaces at the start of a line
Patch Set #1, Line 504: for (Index = 0; Index < Count; Index++) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 505: if (Resource->Header.RscType == END_OF_RESOURCES) {
please, no spaces at the start of a line
Patch Set #1, Line 505: if (Resource->Header.RscType == END_OF_RESOURCES) {
suspect code indent for conditional statements (4, 6)
Patch Set #1, Line 505: if (Resource->Header.RscType == END_OF_RESOURCES) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 506: break;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 508: Resource = (STM_RSC *)((void *)Resource + Resource->Header.Length);
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 510: return (UINTN)((uint32_t)Resource - (uint32_t) ResourceList);
please, no spaces at the start of a line
Patch Set #1, Line 519: If 0, list must be terminated by END_OF_RESOURCES.
code indent should use tabs where possible
Patch Set #1, Line 523: @retval EFI_OUT_OF_RESOURCES If nested procedure returned it and we cannot allocate more areas.
line over 80 characters
Patch Set #1, Line 527: AddPiResource (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 528: STM_RSC *ResourceList,
please, no spaces at the start of a line
Patch Set #1, Line 529: uint32_t NumEntries
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 533: UINTN ResourceSize;
please, no spaces at the start of a line
Patch Set #1, Line 537: printk (BIOS_DEBUG, "AddPiResource - Enter\n");
please, no spaces at the start of a line
Patch Set #1, Line 537: printk (BIOS_DEBUG, "AddPiResource - Enter\n");
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 537: printk (BIOS_DEBUG, "AddPiResource - Enter\n");
Prefer using '"%s...", __func__' to using 'AddPiResource', this function's name, in a string
Patch Set #1, Line 539: if (!ValidateResource (ResourceList, NumEntries)) {
please, no spaces at the start of a line
Patch Set #1, Line 539: if (!ValidateResource (ResourceList, NumEntries)) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 539: if (!ValidateResource (ResourceList, NumEntries)) {
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 539: if (!ValidateResource (ResourceList, NumEntries)) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 540: return -1; //EFI_INVALID_PARAMETER;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 543: ResourceSize = GetResourceSize (ResourceList, NumEntries);
please, no spaces at the start of a line
Patch Set #1, Line 543: ResourceSize = GetResourceSize (ResourceList, NumEntries);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 544: printk (BIOS_DEBUG, "ResourceSize - 0x%08llx\n", ResourceSize);
please, no spaces at the start of a line
Patch Set #1, Line 544: printk (BIOS_DEBUG, "ResourceSize - 0x%08llx\n", ResourceSize);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 545: if (ResourceSize == 0) {
please, no spaces at the start of a line
Patch Set #1, Line 545: if (ResourceSize == 0) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 545: if (ResourceSize == 0) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 546: return -1;//EFI_INVALID_PARAMETER;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 549: if (mStmResourcesPtr == NULL) {
please, no spaces at the start of a line
Patch Set #1, Line 549: if (mStmResourcesPtr == NULL) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 551: // Copy EndResource for intialization
'intialization' may be misspelled - perhaps 'initialization'?
Patch Set #1, Line 556: mStmResourcesPtr = StmResourceHeap;
please, no spaces at the start of a line
Patch Set #1, Line 557: mStmResourceTotalSize = RESOURCEHEAPSIZE;
please, no spaces at the start of a line
Patch Set #1, Line 558: memset(mStmResourcesPtr, 0, RESOURCEHEAPSIZE);
please, no spaces at the start of a line
Patch Set #1, Line 560: memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode));
please, no spaces at the start of a line
Patch Set #1, Line 560: memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode));
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 561: mStmResourceSizeUsed = sizeof(mRscEndNode);
please, no spaces at the start of a line
Patch Set #1, Line 562: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode);
please, no spaces at the start of a line
Patch Set #1, Line 568: } else if (mStmResourceSizeAvailable < ResourceSize) {
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 579: AddResource (ResourceList, NumEntries);
please, no spaces at the start of a line
Patch Set #1, Line 579: AddResource (ResourceList, NumEntries);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 581: return 0;//EFI_SUCCESS;
please, no spaces at the start of a line
Patch Set #1, Line 589: NULL means delete all resources.
code indent should use tabs where possible
Patch Set #1, Line 591: If 0, list must be terminated by END_OF_RESOURCES.
code indent should use tabs where possible
Patch Set #1, Line 598: DeletePiResource (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 599: STM_RSC *ResourceList,
please, no spaces at the start of a line
Patch Set #1, Line 600: uint32_t NumEntries
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 603: if (ResourceList != NULL) {
please, no spaces at the start of a line
Patch Set #1, Line 603: if (ResourceList != NULL) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 606: return -1;//EFI_UNSUPPORTED;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 611: memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode));
please, no spaces at the start of a line
Patch Set #1, Line 611: memcpy (mStmResourcesPtr, &mRscEndNode, sizeof(mRscEndNode));
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 612: mStmResourceSizeUsed = sizeof(mRscEndNode);
please, no spaces at the start of a line
Patch Set #1, Line 613: mStmResourceSizeAvailable = mStmResourceTotalSize - sizeof(mRscEndNode);
please, no spaces at the start of a line
Patch Set #1, Line 614: return 0;//EFI_SUCCESS;
please, no spaces at the start of a line
Patch Set #1, Line 623: On output it means size of resource list filled,
code indent should use tabs where possible
Patch Set #1, Line 624: or the size of resource list to be filled if size of too small.
line over 80 characters
Patch Set #1, Line 624: or the size of resource list to be filled if size of too small.
code indent should use tabs where possible
Patch Set #1, Line 627: @retval EFI_BUFFER_TOO_SMALL If resource list buffer is too small to hold the whole resources.
line over 80 characters
Patch Set #1, Line 631: GetPiResource (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 632: STM_RSC *ResourceList,
please, no spaces at the start of a line
Patch Set #1, Line 633: uint32_t *ResourceSize
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 636: if (*ResourceSize < mStmResourceSizeUsed) {
please, no spaces at the start of a line
Patch Set #1, Line 636: if (*ResourceSize < mStmResourceSizeUsed) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 637: *ResourceSize = (uint32_t)mStmResourceSizeUsed;
please, no spaces at the start of a line
Patch Set #1, Line 638: return -1;//EFI_BUFFER_TOO_SMALL;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 641: memcpy (ResourceList, mStmResourcesPtr, mStmResourceSizeUsed);
please, no spaces at the start of a line
Patch Set #1, Line 641: memcpy (ResourceList, mStmResourcesPtr, mStmResourceSizeUsed);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 642: *ResourceSize = (uint32_t)mStmResourceSizeUsed;
please, no spaces at the start of a line
Patch Set #1, Line 643: return 0;//EFI_SUCCESS;
please, no spaces at the start of a line
Patch Set #1, Line 652: GetVmcsSize (
space prohibited between function name and open parenthesis '('
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 656: uint32_t ThisVmcsSize;
please, no spaces at the start of a line
Patch Set #1, Line 657: VMX_BASIC_MSR MsrData64;
please, no spaces at the start of a line
Patch Set #1, Line 658: int StmSupport;
please, no spaces at the start of a line
Patch Set #1, Line 660: MsrData64.msr = rdmsr (IA32_VMX_BASIC_MSR_INDEX);
trailing whitespace
Patch Set #1, Line 660: MsrData64.msr = rdmsr (IA32_VMX_BASIC_MSR_INDEX);
please, no spaces at the start of a line
Patch Set #1, Line 660: MsrData64.msr = rdmsr (IA32_VMX_BASIC_MSR_INDEX);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 662: ThisVmcsSize = MsrData64.bits.VmcsSize;
please, no spaces at the start of a line
Patch Set #1, Line 663: StmSupport = MsrData64.bits.StmSupported;
please, no spaces at the start of a line
Patch Set #1, Line 664: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport);
line over 80 characters
Patch Set #1, Line 664: printk(BIOS_DEBUG, "GetVmcsSize: Size %d StmSupport %d\n", ThisVmcsSize, StmSupport);
please, no spaces at the start of a line
Patch Set #1, Line 664: 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
Patch Set #1, Line 669: ThisVmcsSize = STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (ThisVmcsSize));
please, no spaces at the start of a line
Patch Set #1, Line 669: ThisVmcsSize = STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (ThisVmcsSize));
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 669: ThisVmcsSize = STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (ThisVmcsSize));
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 671: return ThisVmcsSize;
please, no spaces at the start of a line
Patch Set #1, Line 683: StmGen4GPageTableIa32 (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 684: uint32_t PageTableBase
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 687: UINTN Index;
please, no spaces at the start of a line
Patch Set #1, Line 688: uint32_t *Pte;
please, no spaces at the start of a line
Patch Set #1, Line 689: uint32_t Address;
please, no spaces at the start of a line
Patch Set #1, Line 691: Pte = (uint32_t*)(uint32_t)PageTableBase;
please, no spaces at the start of a line
Patch Set #1, Line 691: Pte = (uint32_t*)(uint32_t)PageTableBase;
"(foo*)" should be "(foo *)"
Patch Set #1, Line 693: Address = 0;
please, no spaces at the start of a line
Patch Set #1, Line 694: for (Index = 0; Index < SIZE_4KB / sizeof (*Pte); Index++) {
please, no spaces at the start of a line
Patch Set #1, Line 694: for (Index = 0; Index < SIZE_4KB / sizeof (*Pte); Index++) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 694: for (Index = 0; Index < SIZE_4KB / sizeof (*Pte); Index++) {
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 695: *Pte = Address | IA32_PG_PS | IA32_PG_RW | IA32_PG_P;
please, no spaces at the start of a line
Patch Set #1, Line 696: Pte++;
please, no spaces at the start of a line
Patch Set #1, Line 697: Address += SIZE_4MB;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 700: return ;
please, no spaces at the start of a line
Patch Set #1, Line 700: return ;
space prohibited before semicolon
Patch Set #1, Line 712: StmGen4GPageTableX64 (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 713: uint32_t PageTableBase
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 716: UINTN Index;
please, no spaces at the start of a line
Patch Set #1, Line 717: UINTN SubIndex;
please, no spaces at the start of a line
Patch Set #1, Line 718: uint64_t *Pde;
please, no spaces at the start of a line
Patch Set #1, Line 719: uint64_t *Pte;
please, no spaces at the start of a line
Patch Set #1, Line 720: uint64_t *Pml4;
please, no spaces at the start of a line
Patch Set #1, Line 722: Pml4 = (uint64_t*)(uint32_t) PageTableBase;
please, no spaces at the start of a line
Patch Set #1, Line 722: Pml4 = (uint64_t*)(uint32_t) PageTableBase;
"(foo*)" should be "(foo *)"
Patch Set #1, Line 723: PageTableBase += SIZE_4KB;
please, no spaces at the start of a line
Patch Set #1, Line 724: *Pml4 = PageTableBase | IA32_PG_RW | IA32_PG_P;
please, no spaces at the start of a line
Patch Set #1, Line 726: Pde = (uint64_t*)(uint32_t)PageTableBase;
please, no spaces at the start of a line
Patch Set #1, Line 726: Pde = (uint64_t*)(uint32_t)PageTableBase;
"(foo*)" should be "(foo *)"
Patch Set #1, Line 727: PageTableBase += SIZE_4KB;
please, no spaces at the start of a line
Patch Set #1, Line 728: Pte = (uint64_t *)(uint32_t)PageTableBase;
please, no spaces at the start of a line
Patch Set #1, Line 730: for (Index = 0; Index < 4; Index++) {
please, no spaces at the start of a line
Patch Set #1, Line 730: for (Index = 0; Index < 4; Index++) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 731: *Pde = PageTableBase | IA32_PG_RW | IA32_PG_P;
please, no spaces at the start of a line
Patch Set #1, Line 732: Pde++;
please, no spaces at the start of a line
Patch Set #1, Line 733: PageTableBase += SIZE_4KB;
please, no spaces at the start of a line
Patch Set #1, Line 735: for (SubIndex = 0; SubIndex < SIZE_4KB / sizeof (*Pte); SubIndex++) {
please, no spaces at the start of a line
Patch Set #1, Line 735: for (SubIndex = 0; SubIndex < SIZE_4KB / sizeof (*Pte); SubIndex++) {
suspect code indent for conditional statements (4, 6)
Patch Set #1, Line 735: for (SubIndex = 0; SubIndex < SIZE_4KB / sizeof (*Pte); SubIndex++) {
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 736: *Pte = (((Index << 9) + SubIndex) << 21) | IA32_PG_PS | IA32_PG_RW | IA32_PG_P;
line over 80 characters
Patch Set #1, Line 736: *Pte = (((Index << 9) + SubIndex) << 21) | IA32_PG_PS | IA32_PG_RW | IA32_PG_P;
please, no spaces at the start of a line
Patch Set #1, Line 737: Pte++;
please, no spaces at the start of a line
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 741: return ;
please, no spaces at the start of a line
Patch Set #1, Line 741: return ;
space prohibited before semicolon
Patch Set #1, Line 755: bool StmCheckStmImage (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 756: void * StmImage,
please, no spaces at the start of a line
Patch Set #1, Line 756: void * StmImage,
"foo * bar" should be "foo *bar"
Patch Set #1, Line 757: uint32_t StmImageSize
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 760: UINTN MinMsegSize;
please, no spaces at the start of a line
Patch Set #1, Line 761: STM_HEADER *StmHeader;
please, no spaces at the start of a line
Patch Set #1, Line 763: StmHeader = (STM_HEADER *)StmImage;
please, no spaces at the start of a line
Patch Set #1, Line 768: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) +
line over 80 characters
Patch Set #1, Line 768: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) +
please, no spaces at the start of a line
Patch Set #1, Line 768: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) +
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 768: MinMsegSize = (STM_PAGES_TO_SIZE (STM_SIZE_TO_PAGES (StmHeader->SwStmHdr.StaticImageSize)) +
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 769: StmHeader->SwStmHdr.AdditionalDynamicMemorySize +
code indent should use tabs where possible
Patch Set #1, Line 769: StmHeader->SwStmHdr.AdditionalDynamicMemorySize +
please, no spaces at the start of a line
Patch Set #1, Line 770: (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count);
line over 80 characters
Patch Set #1, Line 770: (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count);
code indent should use tabs where possible
Patch Set #1, Line 770: (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count);
please, no spaces at the start of a line
Patch Set #1, Line 770: (StmHeader->SwStmHdr.PerProcDynamicMemorySize + GetVmcsSize () * 2) * mp_state.cpu_count);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 771: if (MinMsegSize < StmImageSize) {
please, no spaces at the start of a line
Patch Set #1, Line 771: if (MinMsegSize < StmImageSize) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 771: if (MinMsegSize < StmImageSize) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 772: MinMsegSize = StmImageSize;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 775: if (StmHeader->HwStmHdr.Cr3Offset >= StmHeader->SwStmHdr.StaticImageSize) {
please, no spaces at the start of a line
Patch Set #1, Line 775: if (StmHeader->HwStmHdr.Cr3Offset >= StmHeader->SwStmHdr.StaticImageSize) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 779: if (MinMsegSize < StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6)) {
please, no spaces at the start of a line
Patch Set #1, Line 779: if (MinMsegSize < StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6)) {
suspect code indent for conditional statements (4, 6)
Patch Set #1, Line 779: if (MinMsegSize < StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6)) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 780: MinMsegSize = StmHeader->HwStmHdr.Cr3Offset + STM_PAGES_TO_SIZE(6);
please, no spaces at the start of a line
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 787: if (MinMsegSize > CONFIG_MSEG_SIZE) {
please, no spaces at the start of a line
Patch Set #1, Line 787: if (MinMsegSize > CONFIG_MSEG_SIZE) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 787: if (MinMsegSize > CONFIG_MSEG_SIZE) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 788: return false;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 791: return true;
please, no spaces at the start of a line
Patch Set #1, Line 805: StmLoadStmImage (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 806: void * StmImage,
please, no spaces at the start of a line
Patch Set #1, Line 806: void * StmImage,
"foo * bar" should be "foo *bar"
Patch Set #1, Line 807: UINTN StmImageSize
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 810: uint32_t MsegBase;
please, no spaces at the start of a line
Patch Set #1, Line 811: STM_HEADER *StmHeader;
please, no spaces at the start of a line
Patch Set #1, Line 812: SMM_MONITOR_CTL_MSR SmmMonitorMsr;
please, no spaces at the start of a line
Patch Set #1, Line 814: StmHeader = (STM_HEADER *)(uint32_t)StmImage;
please, no spaces at the start of a line
Patch Set #1, Line 815: SmmMonitorMsr.msr = rdmsr(IA32_SMM_MONITOR_CTL_MSR_INDEX);
please, no spaces at the start of a line
Patch Set #1, Line 816: MsegBase = SmmMonitorMsr.bits.MsegAddress << 12;
please, no spaces at the start of a line
Patch Set #1, Line 820: memset((void *) MsegBase, 0, CONFIG_MSEG_SIZE);
please, no spaces at the start of a line
Patch Set #1, Line 821: //memcpy ((void *)(uint32_t)MsegBase, (void *)(uint32_t)StmImage, StmImageSize);
line over 80 characters
Patch Set #1, Line 822: memcpy((void *) MsegBase, (void *) StmImage, (size_t) StmImageSize);
please, no spaces at the start of a line
Patch Set #1, Line 825: if (sizeof(UINTN) == sizeof(uint64_t)) {
please, no spaces at the start of a line
Patch Set #1, Line 825: if (sizeof(UINTN) == sizeof(uint64_t)) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 825: if (sizeof(UINTN) == sizeof(uint64_t)) {
braces {} are not necessary for any arm of this statement
Patch Set #1, Line 826: StmGen4GPageTableX64 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset);
please, no spaces at the start of a line
Patch Set #1, Line 826: StmGen4GPageTableX64 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 827: } else {
please, no spaces at the start of a line
Patch Set #1, Line 827: } else {
suspect code indent for conditional statements (1, 4)
Patch Set #1, Line 828: StmGen4GPageTableIa32 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset);
please, no spaces at the start of a line
Patch Set #1, Line 828: StmGen4GPageTableIa32 ((UINTN)MsegBase + StmHeader->HwStmHdr.Cr3Offset);
space prohibited between function name and open parenthesis '('
please, no spaces at the start of a line
Patch Set #1, Line 844: @retval EFI_BUFFER_TOO_SMALL MSEG is smaller than minimal requirement of STM image
line over 80 characters
Patch Set #1, Line 848: int LoadMonitor (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 849: void * StmImage,
please, no spaces at the start of a line
Patch Set #1, Line 849: void * StmImage,
"foo * bar" should be "foo *bar"
Patch Set #1, Line 850: uint32_t StmImageSize
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 853: SMM_MONITOR_CTL_MSR SmmMonCtlMsr;
please, no spaces at the start of a line
Patch Set #1, Line 855: SmmMonCtlMsr.msr = (msr_t) rdmsr(IA32_SMM_MONITOR_CTL_MSR_INDEX);
please, no spaces at the start of a line
Patch Set #1, Line 857: if (SmmMonCtlMsr.bits.MsegAddress == 0) {
please, no spaces at the start of a line
Patch Set #1, Line 857: if (SmmMonCtlMsr.bits.MsegAddress == 0) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 857: if (SmmMonCtlMsr.bits.MsegAddress == 0) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 858: return STM_UNSUPPORTED;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 860: if (SmmMonCtlMsr.bits.valid != 0) {
please, no spaces at the start of a line
Patch Set #1, Line 860: if (SmmMonCtlMsr.bits.valid != 0) {
suspect code indent for conditional statements (2, 2)
please, no spaces at the start of a line
Patch Set #1, Line 865: if (!StmCheckStmImage (StmImage, StmImageSize)) {
please, no spaces at the start of a line
Patch Set #1, Line 865: if (!StmCheckStmImage (StmImage, StmImageSize)) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 865: if (!StmCheckStmImage (StmImage, StmImageSize)) {
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 865: if (!StmCheckStmImage (StmImage, StmImageSize)) {
braces {} are not necessary for single statement blocks
Patch Set #1, Line 866: return STM_BUFFER_TOO_SMALL;
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 870: // Record STM_HASH to PCR 0, just in case it is NOT TXT launch, we still need provide the evidence.
line over 80 characters
Patch Set #1, Line 871: TpmMeasureAndLogData(
please, no spaces at the start of a line
Patch Set #1, Line 872: 0, // PcrIndex
please, no spaces at the start of a line
Patch Set #1, Line 873: TXT_EVTYPE_STM_HASH, // EventType
please, no spaces at the start of a line
Patch Set #1, Line 874: NULL, // EventLog
please, no spaces at the start of a line
Patch Set #1, Line 875: 0, // LogLen
please, no spaces at the start of a line
Patch Set #1, Line 876: (void *)StmImage, // HashData
please, no spaces at the start of a line
Patch Set #1, Line 877: StmImageSize // HashDataLen
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 880: StmLoadStmImage (StmImage, StmImageSize);
please, no spaces at the start of a line
Patch Set #1, Line 880: StmLoadStmImage (StmImage, StmImageSize);
space prohibited between function name and open parenthesis '('
trailing whitespace
code indent should use tabs where possible
please, no spaces at the start of a line
Patch Set #1, Line 882: mStmState |= STM_SM_MONITOR_STATE_ENABLED;
please, no spaces at the start of a line
Patch Set #1, Line 884: return STM_SUCCESS;
please, no spaces at the start of a line
please, no spaces at the start of a line
please, no spaces at the start of a line
Patch Set #1, Line 899: return mStmResourcesPtr;
please, no spaces at the start of a line
File src/security/stm/StmPlatformResource.c:
Patch Set #1, Line 1: /** @file
trailing whitespace
Patch Set #1, Line 2: STM platform SMM resource
trailing whitespace
trailing whitespace
Patch Set #1, Line 4: Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
trailing whitespace
Patch Set #1, Line 5: This program and the accompanying materials
trailing whitespace
Patch Set #1, Line 6: are licensed and made available under the terms and conditions of the BSD License
trailing whitespace
Patch Set #1, Line 6: are licensed and made available under the terms and conditions of the BSD License
line over 80 characters
Patch Set #1, Line 7: which accompanies this distribution. The full text of the license may be found at
trailing whitespace
Patch Set #1, Line 7: which accompanies this distribution. The full text of the license may be found at
line over 80 characters
Patch Set #1, Line 8: http://opensource.org/licenses/bsd-license.php.
trailing whitespace
trailing whitespace
Patch Set #1, Line 10: THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
trailing whitespace
Patch Set #1, Line 11: WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
trailing whitespace
trailing whitespace
DOS line endings
DOS line endings
Patch Set #1, Line 15: #include <stdint.h>
DOS line endings
Patch Set #1, Line 16: #include <cpu/x86/StmApi.h>
DOS line endings
Patch Set #1, Line 17: #include <cpu/x86/SmmStm.h>
DOS line endings
Patch Set #1, Line 18: #include <cpu/x86/StmPlatformResource.h>
DOS line endings
DOS line endings
Patch Set #1, Line 20: #include <southbridge/intel/common/pmutil.h>
DOS line endings
Patch Set #1, Line 21: #include <cpu/x86/msr.h>
DOS line endings
DOS line endings
Patch Set #1, Line 23: #define RDWR_ACCS 3
DOS line endings
Patch Set #1, Line 24: #define FULL_ACCS 7
DOS line endings
DOS line endings
Patch Set #1, Line 26: uint32_t mMaxBus;
DOS line endings
Patch Set #1, Line 27: uint32_t mTsegBase;
DOS line endings
Patch Set #1, Line 28: uint32_t mTsegSize;
DOS line endings
Patch Set #1, Line 29: uint16_t mPmBase;
DOS line endings
DOS line endings
Patch Set #1, Line 31: typedef union {
DOS line endings
Patch Set #1, Line 32: uint64_t uint64;
DOS line endings
Patch Set #1, Line 33: msr_t msr;
DOS line endings
Patch Set #1, Line 34: } msr64_t;
DOS line endings
DOS line endings
Patch Set #1, Line 36: //uint64_t PciRead64 (UINTN Address);
trailing whitespace
Patch Set #1, Line 37: void ResourceInit (void);
DOS line endings
Patch Set #1, Line 37: void ResourceInit (void);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 38: void FixupPciexResource (void);
DOS line endings
Patch Set #1, Line 38: void FixupPciexResource (void);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 39: void AddSimpleResources (void);
DOS line endings
Patch Set #1, Line 39: void AddSimpleResources (void);
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 40: void AddMsrResources (void);
DOS line endings
Patch Set #1, Line 40: void AddMsrResources (void);
space prohibited between function name and open parenthesis '('
DOS line endings
trailing whitespace
Patch Set #1, Line 43: // Fixed memory ranges
trailing whitespace
trailing whitespace
DOS line endings
trailing whitespace
Patch Set #1, Line 47: // TSEG memory!
trailing whitespace
trailing whitespace
Patch Set #1, Line 49: STM_RSC_MEM_DESC RscTsegMemory = {
DOS line endings
Patch Set #1, Line 50: {MEM_RANGE, sizeof (STM_RSC_MEM_DESC)},
DOS line endings
Patch Set #1, Line 50: {MEM_RANGE, sizeof (STM_RSC_MEM_DESC)},
please, no spaces at the start of a line
Patch Set #1, Line 50: {MEM_RANGE, sizeof (STM_RSC_MEM_DESC)},
space prohibited between function name and open parenthesis '('
DOS line endings
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
Patch Set #1, Line 53: FULL_ACCS
DOS line endings
Patch Set #1, Line 53: FULL_ACCS
please, no spaces at the start of a line
DOS line endings
trailing whitespace
Patch Set #1, Line 56: // Flash part
trailing whitespace
trailing whitespace
Patch Set #1, Line 58: STM_RSC_MEM_DESC RscSpiMemory = {
DOS line endings
Patch Set #1, Line 59: {MEM_RANGE, sizeof (STM_RSC_MEM_DESC)},
DOS line endings
Patch Set #1, Line 59: {MEM_RANGE, sizeof (STM_RSC_MEM_DESC)},
please, no spaces at the start of a line
Patch Set #1, Line 59: {MEM_RANGE, sizeof (STM_RSC_MEM_DESC)},
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 60: 0xFE000000,
DOS line endings
Patch Set #1, Line 60: 0xFE000000,
please, no spaces at the start of a line
Patch Set #1, Line 61: 0x01000000,
DOS line endings
Patch Set #1, Line 61: 0x01000000,
please, no spaces at the start of a line
Patch Set #1, Line 62: FULL_ACCS
DOS line endings
Patch Set #1, Line 62: FULL_ACCS
please, no spaces at the start of a line
DOS line endings
trailing whitespace
Patch Set #1, Line 65: // ACPI
trailing whitespace
trailing whitespace
Patch Set #1, Line 67: STM_RSC_IO_DESC RscPmIo = {
DOS line endings
Patch Set #1, Line 68: {IO_RANGE, sizeof (STM_RSC_IO_DESC)},
DOS line endings
Patch Set #1, Line 68: {IO_RANGE, sizeof (STM_RSC_IO_DESC)},
please, no spaces at the start of a line
Patch Set #1, Line 68: {IO_RANGE, sizeof (STM_RSC_IO_DESC)},
space prohibited between function name and open parenthesis '('
DOS line endings
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 74: // PCIE MMIO
trailing whitespace
trailing whitespace
Patch Set #1, Line 76: STM_RSC_MMIO_DESC RscPcieMmio = {
DOS line endings
Patch Set #1, Line 77: {MMIO_RANGE, sizeof (STM_RSC_MMIO_DESC)},
DOS line endings
Patch Set #1, Line 77: {MMIO_RANGE, sizeof (STM_RSC_MMIO_DESC)},
please, no spaces at the start of a line
Patch Set #1, Line 77: {MMIO_RANGE, sizeof (STM_RSC_MMIO_DESC)},
space prohibited between function name and open parenthesis '('
DOS line endings
please, no spaces at the start of a line
Patch Set #1, Line 79: 0, // Length
trailing whitespace
Patch Set #1, Line 79: 0, // Length
please, no spaces at the start of a line
Patch Set #1, Line 80: RDWR_ACCS
DOS line endings
Patch Set #1, Line 80: RDWR_ACCS
please, no spaces at the start of a line
DOS line endings
trailing whitespace
Patch Set #1, Line 83: // Local APIC
trailing whitespace
trailing whitespace
Patch Set #1, Line 85: STM_RSC_MMIO_DESC RscApicMmio = {
DOS line endings
Patch Set #1, Line 86: {MMIO_RANGE, sizeof (STM_RSC_MMIO_DESC)},
DOS line endings
Patch Set #1, Line 86: {MMIO_RANGE, sizeof (STM_RSC_MMIO_DESC)},
please, no spaces at the start of a line
Patch Set #1, Line 86: {MMIO_RANGE, sizeof (STM_RSC_MMIO_DESC)},
space prohibited between function name and open parenthesis '('
DOS line endings
please, no spaces at the start of a line
Patch Set #1, Line 88: 0x400,
DOS line endings
Patch Set #1, Line 88: 0x400,
please, no spaces at the start of a line
Patch Set #1, Line 89: RDWR_ACCS
DOS line endings
Patch Set #1, Line 89: RDWR_ACCS
please, no spaces at the start of a line
DOS line endings
trailing whitespace
Patch Set #1, Line 92: // Software SMI
trailing whitespace
trailing whitespace
Patch Set #1, Line 94: STM_RSC_TRAPPED_IO_DESC RscSwSmiTrapIo = {
DOS line endings
Patch Set #1, Line 95: {TRAPPED_IO_RANGE, sizeof (STM_RSC_TRAPPED_IO_DESC)},
DOS line endings
Patch Set #1, Line 95: {TRAPPED_IO_RANGE, sizeof (STM_RSC_TRAPPED_IO_DESC)},
please, no spaces at the start of a line
Patch Set #1, Line 95: {TRAPPED_IO_RANGE, sizeof (STM_RSC_TRAPPED_IO_DESC)},
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 96: 0xB2,
DOS line endings
Patch Set #1, Line 96: 0xB2,
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
trailing whitespace
Patch Set #1, Line 100: // End of list
trailing whitespace
trailing whitespace
Patch Set #1, Line 102: STM_RSC_END RscListEnd = {
DOS line endings
Patch Set #1, Line 103: {END_OF_RESOURCES, sizeof (STM_RSC_END)},
DOS line endings
Patch Set #1, Line 103: {END_OF_RESOURCES, sizeof (STM_RSC_END)},
please, no spaces at the start of a line
Patch Set #1, Line 103: {END_OF_RESOURCES, sizeof (STM_RSC_END)},
space prohibited between function name and open parenthesis '('
DOS line endings
please, no spaces at the start of a line
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 108: // Common PCI devices
trailing whitespace
trailing whitespace
trailing whitespace
Patch Set #1, Line 111: // LPC bridge
trailing whitespace
trailing whitespace
Patch Set #1, Line 113: STM_RSC_PCI_CFG_DESC RscLpcBridgePci = {
DOS line endings
Patch Set #1, Line 114: {PCI_CFG_RANGE, sizeof (STM_RSC_PCI_CFG_DESC)},
DOS line endings
Patch Set #1, Line 114: {PCI_CFG_RANGE, sizeof (STM_RSC_PCI_CFG_DESC)},
please, no spaces at the start of a line
Patch Set #1, Line 114: {PCI_CFG_RANGE, sizeof (STM_RSC_PCI_CFG_DESC)},
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 115: RDWR_ACCS, 0,
DOS line endings
Patch Set #1, Line 115: RDWR_ACCS, 0,
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
Patch Set #1, Line 117: 0x1000,
DOS line endings
Patch Set #1, Line 117: 0x1000,
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
Patch Set #1, Line 121: {1, 1, sizeof(STM_PCI_DEVICE_PATH_NODE), LPC_FUNCTION, LPC_DEVICE},
DOS line endings
Patch Set #1, Line 121: {1, 1, sizeof(STM_PCI_DEVICE_PATH_NODE), LPC_FUNCTION, LPC_DEVICE},
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 126: // Template for MSR resources.
trailing whitespace
trailing whitespace
Patch Set #1, Line 128: STM_RSC_MSR_DESC RscMsrTpl = {
DOS line endings
Patch Set #1, Line 129: {MACHINE_SPECIFIC_REG, sizeof (STM_RSC_MSR_DESC)},
DOS line endings
Patch Set #1, Line 129: {MACHINE_SPECIFIC_REG, sizeof (STM_RSC_MSR_DESC)},
please, no spaces at the start of a line
Patch Set #1, Line 129: {MACHINE_SPECIFIC_REG, sizeof (STM_RSC_MSR_DESC)},
space prohibited between function name and open parenthesis '('
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 133: // MSR indices to register
trailing whitespace
trailing whitespace
Patch Set #1, Line 135: typedef struct {
DOS line endings
Patch Set #1, Line 136: uint32_t MsrIndex;
DOS line endings
Patch Set #1, Line 136: uint32_t MsrIndex;
please, no spaces at the start of a line
Patch Set #1, Line 137: uint64_t ReadMask;
DOS line endings
Patch Set #1, Line 137: uint64_t ReadMask;
please, no spaces at the start of a line
Patch Set #1, Line 138: uint64_t WriteMask;
DOS line endings
Patch Set #1, Line 138: uint64_t WriteMask;
please, no spaces at the start of a line
Patch Set #1, Line 139: } MSR_TABLE_ENTRY;
DOS line endings
DOS line endings
Patch Set #1, Line 141: MSR_TABLE_ENTRY MsrTable[] = {
DOS line endings
Patch Set #1, Line 142: // Index Read Write // MASK64 means need access, MASK0 means no need access.
trailing whitespace
Patch Set #1, Line 142: // Index Read Write // MASK64 means need access, MASK0 means no need access.
line over 80 characters
Patch Set #1, Line 143: {SMRR_PHYSBASE_MSR, MASK64, MASK0},
DOS line endings
Patch Set #1, Line 143: {SMRR_PHYSBASE_MSR, MASK64, MASK0},
please, no spaces at the start of a line
Patch Set #1, Line 144: {SMRR_PHYSMASK_MSR, MASK64, MASK0},
DOS line endings
Patch Set #1, Line 144: {SMRR_PHYSMASK_MSR, MASK64, MASK0},
please, no spaces at the start of a line
DOS line endings
DOS line endings
trailing whitespace
trailing whitespace
Patch Set #1, Line 149: BIOS resources initialization.
trailing whitespace
trailing whitespace
DOS line endings
DOS line endings
Patch Set #1, Line 153: ResourceInit (
DOS line endings
Patch Set #1, Line 153: ResourceInit (
space prohibited between function name and open parenthesis '('
DOS line endings
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 157: mMaxBus = 255;
DOS line endings
Patch Set #1, Line 157: mMaxBus = 255;
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 159: msr_t MsrRead;
DOS line endings
Patch Set #1, Line 159: msr_t MsrRead;
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 161: mPmBase = get_pmbase();
DOS line endings
Patch Set #1, Line 161: mPmBase = get_pmbase();
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 163: //mTsegBase = (uint32_t)rdmsr(SMRR_PHYSBASE_MSR) & 0xFFFFF000;
trailing whitespace
DOS line endings
Patch Set #1, Line 165: MsrRead = rdmsr(SMRR_PHYSBASE_MSR);
DOS line endings
Patch Set #1, Line 165: MsrRead = rdmsr(SMRR_PHYSBASE_MSR);
please, no spaces at the start of a line
Patch Set #1, Line 166: mTsegBase = MsrRead.lo & 0xFFFFF000;
DOS line endings
Patch Set #1, Line 166: mTsegBase = MsrRead.lo & 0xFFFFF000;
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
Patch Set #1, Line 168: //mTsegSize = (uint32_t)(~((uint32_t)rdmsr(SMRR_PHYSMASK_MSR) & 0xFFFFF000) + 1);
trailing whitespace
Patch Set #1, Line 168: //mTsegSize = (uint32_t)(~((uint32_t)rdmsr(SMRR_PHYSMASK_MSR) & 0xFFFFF000) + 1);
line over 80 characters
DOS line endings
please, no spaces at the start of a line
Patch Set #1, Line 170: MsrRead = rdmsr(SMRR_PHYSMASK_MSR);
DOS line endings
Patch Set #1, Line 170: MsrRead = rdmsr(SMRR_PHYSMASK_MSR);
please, no spaces at the start of a line
Patch Set #1, Line 171: mTsegSize = (~(MsrRead.lo & 0xFFFFF000) + 1);
DOS line endings
Patch Set #1, Line 171: mTsegSize = (~(MsrRead.lo & 0xFFFFF000) + 1);
please, no spaces at the start of a line
DOS line endings
DOS line endings
trailing whitespace
trailing whitespace
Patch Set #1, Line 176: Fix up PCIE resource.
trailing whitespace
trailing whitespace
DOS line endings
DOS line endings
Patch Set #1, Line 180: FixupPciexResource (
DOS line endings
Patch Set #1, Line 180: FixupPciexResource (
space prohibited between function name and open parenthesis '('
DOS line endings
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
trailing whitespace
Patch Set #1, Line 185: // Find max bus number and PCIEX length
trailing whitespace
trailing whitespace
Patch Set #1, Line 187: //RscPcieMmio.Length = 0x10000000; // 256 MB
trailing whitespace
Patch Set #1, Line 188: //RscPcieMmio.Base = PcdGet64 (PcdPciExpressBaseAddress);
trailing whitespace
DOS line endings
DOS line endings
trailing whitespace
trailing whitespace
Patch Set #1, Line 193: Add basic resources to BIOS resource database.
trailing whitespace
trailing whitespace
DOS line endings
DOS line endings
Patch Set #1, Line 197: AddSimpleResources (
DOS line endings
Patch Set #1, Line 197: AddSimpleResources (
space prohibited between function name and open parenthesis '('
DOS line endings
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 201: int Status;
DOS line endings
Patch Set #1, Line 201: int Status;
please, no spaces at the start of a line
Patch Set #1, Line 202: msr64_t ReadMsr;
DOS line endings
Patch Set #1, Line 202: msr64_t ReadMsr;
please, no spaces at the start of a line
DOS line endings
trailing whitespace
Patch Set #1, Line 205: // Fix-up values
trailing whitespace
trailing whitespace
Patch Set #1, Line 207: RscTsegMemory.Base = mTsegBase;
DOS line endings
Patch Set #1, Line 207: RscTsegMemory.Base = mTsegBase;
please, no spaces at the start of a line
Patch Set #1, Line 208: RscTsegMemory.Length = mTsegSize;
DOS line endings
Patch Set #1, Line 208: RscTsegMemory.Length = mTsegSize;
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 210: RscPmIo.Base = (uint16_t) mPmBase;
DOS line endings
Patch Set #1, Line 210: RscPmIo.Base = (uint16_t) mPmBase;
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
trailing whitespace
Patch Set #1, Line 213: // Local APIC. We assume that all thteads are programmed identically
trailing whitespace
Patch Set #1, Line 214: // despite that it is possible to have individual APIC address for
trailing whitespace
Patch Set #1, Line 215: // each of the threads. If this is the case this programming should
trailing whitespace
Patch Set #1, Line 216: // be corrected.
trailing whitespace
trailing whitespace
Patch Set #1, Line 218: //RscApicMmio.Base = AsmReadMsr64 (IA32_APIC_BASE_MSR_INDEX) & 0xFFFFFF000ull;
trailing whitespace
Patch Set #1, Line 218: //RscApicMmio.Base = AsmReadMsr64 (IA32_APIC_BASE_MSR_INDEX) & 0xFFFFFF000ull;
line over 80 characters
DOS line endings
Patch Set #1, Line 220: ReadMsr.msr = rdmsr(IA32_APIC_BASE_MSR_INDEX);
DOS line endings
Patch Set #1, Line 221: RscApicMmio.Base = ReadMsr.uint64 & 0xFFFFFF000ull;
DOS line endings
DOS line endings
trailing whitespace
Patch Set #1, Line 224: // PCIEX BAR
trailing whitespace
trailing whitespace
Patch Set #1, Line 226: FixupPciexResource ();
DOS line endings
Patch Set #1, Line 226: FixupPciexResource ();
please, no spaces at the start of a line
Patch Set #1, Line 226: FixupPciexResource ();
space prohibited between function name and open parenthesis '('
DOS line endings
Patch Set #1, Line 228: Status = AddPiResource((void *) &RscTsegMemory, 0);
DOS line endings
Patch Set #1, Line 228: Status = AddPiResource((void *) &RscTsegMemory, 0);
please, no spaces at the start of a line
Patch Set #1, Line 229: //ASSERT_EFI_ERROR (Status);
trailing whitespace
Patch Set #1, Line 230: Status = AddPiResource((void *) &RscLpcBridgePci, 1);
DOS line endings
Patch Set #1, Line 230: Status = AddPiResource((void *) &RscLpcBridgePci, 1);
please, no spaces at the start of a line
Patch Set #1, Line 231: //ASSERT_EFI_ERROR (Status);
trailing whitespace
DOS line endings
DOS line endings
trailing whitespace
trailing whitespace
Patch Set #1, Line 236: Add MSR resources to BIOS resource database.
trailing whitespace
trailing whitespace
DOS line endings
DOS line endings
Patch Set #1, Line 240: AddMsrResources (
DOS line endings
Patch Set #1, Line 240: AddMsrResources (
space prohibited between function name and open parenthesis '('
DOS line endings
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 244: uint32_t Status;
DOS line endings
Patch Set #1, Line 244: uint32_t Status;
please, no spaces at the start of a line
Patch Set #1, Line 245: uint32_t Index;
DOS line endings
Patch Set #1, Line 245: uint32_t Index;
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 247: for (Index = 0; Index < sizeof(MsrTable)/sizeof(MsrTable[0]); Index ++) {
DOS line endings
Patch Set #1, Line 247: for (Index = 0; Index < sizeof(MsrTable)/sizeof(MsrTable[0]); Index ++) {
please, no spaces at the start of a line
Patch Set #1, Line 247: for (Index = 0; Index < sizeof(MsrTable)/sizeof(MsrTable[0]); Index ++) {
suspect code indent for conditional statements (2, 4)
Patch Set #1, Line 247: for (Index = 0; Index < sizeof(MsrTable)/sizeof(MsrTable[0]); Index ++) {
Prefer ARRAY_SIZE(MsrTable)
Patch Set #1, Line 247: for (Index = 0; Index < sizeof(MsrTable)/sizeof(MsrTable[0]); Index ++) {
space prohibited before that '++' (ctx:WxB)
DOS line endings
please, no spaces at the start of a line
Patch Set #1, Line 249: RscMsrTpl.MsrIndex = (uint32_t) MsrTable[Index].MsrIndex;
DOS line endings
Patch Set #1, Line 249: RscMsrTpl.MsrIndex = (uint32_t) MsrTable[Index].MsrIndex;
please, no spaces at the start of a line
Patch Set #1, Line 250: RscMsrTpl.ReadMask = (uint64_t) MsrTable[Index].ReadMask;
DOS line endings
Patch Set #1, Line 250: RscMsrTpl.ReadMask = (uint64_t) MsrTable[Index].ReadMask;
please, no spaces at the start of a line
Patch Set #1, Line 251: RscMsrTpl.WriteMask = (uint64_t) MsrTable[Index].WriteMask;
DOS line endings
Patch Set #1, Line 251: RscMsrTpl.WriteMask = (uint64_t) MsrTable[Index].WriteMask;
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 253: Status = AddPiResource ((void *) &RscMsrTpl, 1);
DOS line endings
Patch Set #1, Line 253: Status = AddPiResource ((void *) &RscMsrTpl, 1);
please, no spaces at the start of a line
Patch Set #1, Line 253: Status = AddPiResource ((void *) &RscMsrTpl, 1);
space prohibited between function name and open parenthesis '('
DOS line endings
please, no spaces at the start of a line
DOS line endings
DOS line endings
trailing whitespace
trailing whitespace
Patch Set #1, Line 259: Add resources to BIOS resource database.
trailing whitespace
trailing whitespace
DOS line endings
DOS line endings
Patch Set #1, Line 263: AddResourcesCmd (
DOS line endings
Patch Set #1, Line 263: AddResourcesCmd (
space prohibited between function name and open parenthesis '('
DOS line endings
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 267: ResourceInit ();
DOS line endings
Patch Set #1, Line 267: ResourceInit ();
please, no spaces at the start of a line
Patch Set #1, Line 267: ResourceInit ();
space prohibited between function name and open parenthesis '('
DOS line endings
Patch Set #1, Line 269: AddSimpleResources();
DOS line endings
Patch Set #1, Line 269: AddSimpleResources();
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 271: AddMsrResources ();
DOS line endings
Patch Set #1, Line 271: AddMsrResources ();
please, no spaces at the start of a line
Patch Set #1, Line 271: AddMsrResources ();
space prohibited between function name and open parenthesis '('
DOS line endings
File src/security/stm/StmPlatformSmm.c:
Patch Set #1, Line 1: /** @file
trailing whitespace
Patch Set #1, Line 2: STM platform SMM API
trailing whitespace
trailing whitespace
Patch Set #1, Line 4: Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
trailing whitespace
Patch Set #1, Line 5: This program and the accompanying materials
trailing whitespace
Patch Set #1, Line 6: are licensed and made available under the terms and conditions of the BSD License
trailing whitespace
Patch Set #1, Line 6: are licensed and made available under the terms and conditions of the BSD License
line over 80 characters
Patch Set #1, Line 7: which accompanies this distribution. The full text of the license may be found at
trailing whitespace
Patch Set #1, Line 7: which accompanies this distribution. The full text of the license may be found at
line over 80 characters
Patch Set #1, Line 8: http://opensource.org/licenses/bsd-license.php.
trailing whitespace
trailing whitespace
Patch Set #1, Line 10: THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
trailing whitespace
Patch Set #1, Line 11: WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
trailing whitespace
trailing whitespace
DOS line endings
DOS line endings
Patch Set #1, Line 15: #include <cpu/x86/StmApi.h>
DOS line endings
Patch Set #1, Line 16: #include <cpu/x86/SmmStm.h>
DOS line endings
Patch Set #1, Line 17: #include <cpu/x86/smm.h>
DOS line endings
DOS line endings
Patch Set #1, Line 19: #include <stddef.h>
DOS line endings
Patch Set #1, Line 20: #include <cbfs.h>
DOS line endings
Patch Set #1, Line 21: #include <console/console.h>
DOS line endings
Patch Set #1, Line 22: #include <lib.h>
DOS line endings
Patch Set #1, Line 23: #include <stdint.h>
DOS line endings
DOS line endings
Patch Set #1, Line 25: int LoadStmImage(uint32_t mseg);
DOS line endings
DOS line endings
Patch Set #1, Line 27: extern bool StmCheckStmImage(void* StmImage, uint32_t StmImageSize);
DOS line endings
Patch Set #1, Line 27: extern bool StmCheckStmImage(void* StmImage, uint32_t StmImageSize);
"foo* bar" should be "foo *bar"
Patch Set #1, Line 28: extern void StmGen4GPageTableIa32(uint32_t PageTableBase);
DOS line endings
Patch Set #1, Line 29: extern void StmGen4GPageTableX64 (uint32_t PageTableBase);
DOS line endings
Patch Set #1, Line 29: extern void StmGen4GPageTableX64 (uint32_t PageTableBase);
space prohibited between function name and open parenthesis '('
DOS line endings
trailing whitespace
Patch Set #1, Line 32: Load STM image.
trailing whitespace
trailing whitespace
Patch Set #1, Line 34: @retval EFI_SUCCESS STM is loaded to MSEG
trailing whitespace
Patch Set #1, Line 35: @retval EFI_BUFFER_TOO_SMALL MSEG is too small
trailing whitespace
Patch Set #1, Line 36: @retval EFI_UNSUPPORTED MSEG is not enabled
trailing whitespace
DOS line endings
Patch Set #1, Line 38: int LoadStmImage (
DOS line endings
Patch Set #1, Line 38: int LoadStmImage (
space prohibited between function name and open parenthesis '('
Patch Set #1, Line 39: uint32_t mseg
DOS line endings
Patch Set #1, Line 39: uint32_t mseg
please, no spaces at the start of a line
DOS line endings
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 42: int Status;
DOS line endings
Patch Set #1, Line 42: int Status;
please, no spaces at the start of a line
Patch Set #1, Line 43: void *MsegBase;
DOS line endings
Patch Set #1, Line 43: void *MsegBase;
please, no spaces at the start of a line
Patch Set #1, Line 44: uint32_t StmBufferSize;
DOS line endings
Patch Set #1, Line 44: uint32_t StmBufferSize;
please, no spaces at the start of a line
Patch Set #1, Line 45: uint32_t StmImageSize;
DOS line endings
Patch Set #1, Line 45: uint32_t StmImageSize;
please, no spaces at the start of a line
Patch Set #1, Line 46: bool StmStatus;
DOS line endings
Patch Set #1, Line 46: bool StmStatus;
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 48: STM_HEADER *StmHeader;
DOS line endings
Patch Set #1, Line 48: STM_HEADER *StmHeader;
please, no spaces at the start of a line
DOS line endings
trailing whitespace
Patch Set #1, Line 51: // Extract STM image from FV
trailing whitespace
trailing whitespace
Patch Set #1, Line 53: MsegBase = (void *) mseg;
DOS line endings
Patch Set #1, Line 53: MsegBase = (void *) mseg;
please, no spaces at the start of a line
Patch Set #1, Line 54: StmBufferSize = CONFIG_MSEG_SIZE;
DOS line endings
Patch Set #1, Line 54: StmBufferSize = CONFIG_MSEG_SIZE;
please, no spaces at the start of a line
Patch Set #1, Line 55: StmImageSize = 0;
DOS line endings
Patch Set #1, Line 55: StmImageSize = 0;
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 57: memset((void *) MsegBase, 0, CONFIG_MSEG_SIZE); // clear the mseg
trailing whitespace
Patch Set #1, Line 57: memset((void *) MsegBase, 0, CONFIG_MSEG_SIZE); // clear the mseg
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 59: StmImageSize = cbfs_boot_load_file("stm.bin", MsegBase, StmBufferSize, CBFS_TYPE_RAW);
DOS line endings
Patch Set #1, Line 59: StmImageSize = cbfs_boot_load_file("stm.bin", MsegBase, StmBufferSize, CBFS_TYPE_RAW);
line over 80 characters
Patch Set #1, Line 59: StmImageSize = cbfs_boot_load_file("stm.bin", MsegBase, StmBufferSize, CBFS_TYPE_RAW);
please, no spaces at the start of a line
Patch Set #1, Line 60: printk(BIOS_DEBUG, "STM loaded into mseg: 0x%08x size: %u \n", (uint32_t) MsegBase, StmImageSize); /* status is number of bytes loaded */
DOS line endings
Patch Set #1, Line 60: 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
Patch Set #1, Line 60: printk(BIOS_DEBUG, "STM loaded into mseg: 0x%08x size: %u \n", (uint32_t) MsegBase, StmImageSize); /* status is number of bytes loaded */
please, no spaces at the start of a line
Patch Set #1, Line 60: 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
DOS line endings
Patch Set #1, Line 62: StmStatus = StmCheckStmImage(MsegBase, StmImageSize);
DOS line endings
Patch Set #1, Line 62: StmStatus = StmCheckStmImage(MsegBase, StmImageSize);
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 64: StmHeader = MsegBase;
DOS line endings
Patch Set #1, Line 64: StmHeader = MsegBase;
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 66: StmGen4GPageTableX64 ((uint32_t)MsegBase + StmHeader->HwStmHdr.Cr3Offset);
DOS line endings
Patch Set #1, Line 66: StmGen4GPageTableX64 ((uint32_t)MsegBase + StmHeader->HwStmHdr.Cr3Offset);
please, no spaces at the start of a line
Patch Set #1, Line 66: StmGen4GPageTableX64 ((uint32_t)MsegBase + StmHeader->HwStmHdr.Cr3Offset);
space prohibited between function name and open parenthesis '('
DOS line endings
Patch Set #1, Line 68: // Debug stuff
trailing whitespace
DOS line endings
Patch Set #1, Line 70: printk(BIOS_DEBUG, "STM Header - Revision: 0x%08x Features: 0x%08x ... Cr3Offset: 0x%08x\n",
DOS line endings
Patch Set #1, Line 71: StmHeader->HwStmHdr.StmHeaderRevision,
DOS line endings
Patch Set #1, Line 72: StmHeader->HwStmHdr.MonitorFeatures,
DOS line endings
Patch Set #1, Line 73: StmHeader->HwStmHdr.Cr3Offset);
DOS line endings
Patch Set #1, Line 74: printk(BIOS_DEBUG, "STM Header - StaticImageSize: %d Cr3Location: 0x%08x \n",
DOS line endings
Patch Set #1, Line 74: printk(BIOS_DEBUG, "STM Header - StaticImageSize: %d Cr3Location: 0x%08x \n",
unnecessary whitespace before a quoted newline
Patch Set #1, Line 75: StmHeader->SwStmHdr.StaticImageSize,
DOS line endings
Patch Set #1, Line 76: ((uint32_t) MsegBase + StmHeader->HwStmHdr.Cr3Offset));
DOS line endings
DOS line endings
Patch Set #1, Line 78: Status = 0; // always return good for now
trailing whitespace
Patch Set #1, Line 78: Status = 0; // always return good for now
please, no spaces at the start of a line
DOS line endings
Patch Set #1, Line 80: return Status;
DOS line endings
Patch Set #1, Line 80: return Status;
please, no spaces at the start of a line
DOS line endings
DOS line endings
Patch Set #1, Line 83: struct descriptor
DOS line endings
DOS line endings
open brace '{' following struct go on the same line
Patch Set #1, Line 85: uint16_t limit;
DOS line endings
Patch Set #1, Line 86: uintptr_t base;
DOS line endings
Patch Set #1, Line 87: } __attribute__((packed));
DOS line endings
DOS line endings
DOS line endings
Patch Set #1, Line 90: void ReadGdtr( struct descriptor * gdtr);
DOS line endings
Patch Set #1, Line 90: void ReadGdtr( struct descriptor * gdtr);
"foo * bar" should be "foo *bar"
Patch Set #1, Line 90: void ReadGdtr( struct descriptor * gdtr);
space prohibited after that open parenthesis '('
DOS line endings
Patch Set #1, Line 92: void ReadGdtr( struct descriptor * gdtr)
DOS line endings
Patch Set #1, Line 92: void ReadGdtr( struct descriptor * gdtr)
"foo * bar" should be "foo *bar"
Patch Set #1, Line 92: void ReadGdtr( struct descriptor * gdtr)
space prohibited after that open parenthesis '('
DOS line endings
Patch Set #1, Line 94: __asm__ __volatile__ (
DOS line endings
Patch Set #1, Line 95: "sgdt %0"
DOS line endings
Patch Set #1, Line 96: : "=m" (*gdtr)
DOS line endings
DOS line endings
DOS line endings
DOS line endings
Patch Set #1, Line 100: void SetupSmmDescriptor(void * smbase, int32_t state_size, int32_t apic_id, int32_t entry32_off)
DOS line endings
Patch Set #1, Line 100: void SetupSmmDescriptor(void * smbase, int32_t state_size, int32_t apic_id, int32_t entry32_off)
line over 80 characters
Patch Set #1, Line 100: void SetupSmmDescriptor(void * smbase, int32_t state_size, int32_t apic_id, int32_t entry32_off)
"foo * bar" should be "foo *bar"
DOS line endings
Patch Set #1, Line 102: struct descriptor Gdtr;
DOS line endings
DOS line endings
Patch Set #1, Line 104: TXT_PROCESSOR_SMM_DESCRIPTOR * Psd;
DOS line endings
Patch Set #1, Line 104: TXT_PROCESSOR_SMM_DESCRIPTOR * Psd;
"foo * bar" should be "foo *bar"
DOS line endings
Patch Set #1, Line 106: Psd = smbase + SMM_PSD_OFFSET - (apic_id * state_size);
DOS line endings
DOS line endings
Patch Set #1, Line 108: printk(BIOS_DEBUG, "Setting up Smm Descriptor - Smbase: %p Psd: %p\n", smbase, Psd);
DOS line endings
Patch Set #1, Line 108: printk(BIOS_DEBUG, "Setting up Smm Descriptor - Smbase: %p Psd: %p\n", smbase, Psd);
line over 80 characters
DOS line endings
Patch Set #1, Line 110: memset(Psd, 0, sizeof(TXT_PROCESSOR_SMM_DESCRIPTOR));
DOS line endings
DOS line endings
Patch Set #1, Line 112: memcpy(&Psd->Signature, TXT_PROCESSOR_SMM_DESCRIPTOR_SIGNATURE, 8);
DOS line endings
Patch Set #1, Line 113: Psd->SmmDescriptorVerMajor = TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MAJOR;
DOS line endings
Patch Set #1, Line 113: Psd->SmmDescriptorVerMajor = TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MAJOR;
line over 80 characters
Patch Set #1, Line 114: Psd->SmmDescriptorVerMinor = TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MINOR;
DOS line endings
Patch Set #1, Line 114: Psd->SmmDescriptorVerMinor = TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MINOR;
line over 80 characters
Patch Set #1, Line 115: Psd->SmmSmiHandlerRip = (uint64_t)((uint32_t)smbase + SMM_ENTRY_OFFSET + entry32_off);
DOS line endings
Patch Set #1, Line 115: Psd->SmmSmiHandlerRip = (uint64_t)((uint32_t)smbase + SMM_ENTRY_OFFSET + entry32_off);
line over 80 characters
Patch Set #1, Line 116: Psd->LocalApicId = apic_id;
DOS line endings
Patch Set #1, Line 117: Psd->Size = sizeof(TXT_PROCESSOR_SMM_DESCRIPTOR);
DOS line endings
Patch Set #1, Line 118: Psd->AcpiRsdp = 0;
DOS line endings
Patch Set #1, Line 119: Psd->BiosHwResourceRequirementsPtr = (uint64_t)((uint32_t)GetStmResource());
DOS line endings
Patch Set #1, Line 119: Psd->BiosHwResourceRequirementsPtr = (uint64_t)((uint32_t)GetStmResource());
line over 80 characters
Patch Set #1, Line 120: Psd->SmmCs = 0x8;
DOS line endings
Patch Set #1, Line 121: Psd->SmmDs = 0x10;
DOS line endings
Patch Set #1, Line 122: Psd->SmmSs = 0x10;
DOS line endings
Patch Set #1, Line 123: Psd->SmmOtherSegment = 0x10;
DOS line endings
Patch Set #1, Line 124: Psd->SmmTr = 0x18;
DOS line endings
DOS line endings
Patch Set #1, Line 126: ReadGdtr(&Gdtr);
DOS line endings
DOS line endings
Patch Set #1, Line 128: Psd->SmmGdtPtr = Gdtr.base;
DOS line endings
Patch Set #1, Line 129: Psd->SmmGdtSize = Gdtr.limit + 1; // the stm will subtract, so need to compensate
trailing whitespace
Patch Set #1, Line 129: Psd->SmmGdtSize = Gdtr.limit + 1; // the stm will subtract, so need to compensate
line over 80 characters
DOS line endings
To view, visit change 33215. To unsubscribe, or for help writing mail filters, visit settings.